SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
AppleScript Date Calculations
Taken from Dates & Times in AppleScripts
The following AppleScript subroutine can be used to help calculate the week of the year. It returns the number of weeks that have elapsed since date "1/1/0001":
on getDatesWeekNum(theDate)
set {dDate, dDateNum} to {"1/1/1000", 364878}
return ((theDate - (date dDate)) div days + dDateNum) div 7 + 1
end getDatesWeekNum
To find the week number of the current date, subtract the number returned by that subroutine for January 1 of the year with the number returned for the current date:
set currentWeekNumber to ((getDatesWeekNum(current date)) - (getDatesWeekNum(date ("1/1/" & (year of the (current date)) as string))))
Technology:
- Log in to post comments