Calculations for determining the week of the year in AppleScript.
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