Может поможет Вам Simple Firewall на DelphiBasics:
http://www.delphibasics.info/home/delphibasicsprojects/simplefirewall
http://www.delphibasics.info/home/delphibasicsprojects/simplefirewall/SimpleFirewall.rar?attredirects=0&d=1
В зависимости от версии Delphi посмотрите DateUtils.EncodeDateWeek Function:
Returns a TDateTime that represents a specified day of a specified week in a specified year.
function EncodeDateWeek(const AYear: Word; const AWeekOfYear: Word; const ADayOfWeek: Word = 1): TDateTime...