Convert date to a week number
Currently I use user input to work this out.
like this
display dialog thePrefix & "Please enter the week number:" default answer theWeekNumber
set theWeekNumber to text returned of result
display dialog thePrefix & "Please enter the Month:" default answer theMonth
set theMonth to text returned of result
For the month line I need it to convert say the month we are in to "08 August" I like to use the "08" as it helps keep the order in list view consistant.
Now for the week number it is more complicated as I need it to work with our work calender.
I use a similare method in excel the calulation takes this form.
=INT(((NOW())-DATE(YEAR((NOW())-31),-3,-14)-WEEKDAY((NOW()),1))/7)+2
Monday August 20th will be week1.
How can i get applescript to get the date and convert to week number and also the month.
Many Thanks
Matt
iMac, Mac OS X (10.6.8)