Re: Newbie: Coercing Month of date class to a number
Re: Newbie: Coercing Month of date class to a number
- Subject: Re: Newbie: Coercing Month of date class to a number
- From: JJ <email@hidden>
- Date: Wed, 20 Feb 2002 23:00:21 +0100
>
Is there an easier way of doing this directly using "current date", or is
>
this the only way of doing it, or should I use a repeat loop?
This old subroutine returns the "numeric" month:
set current_date to (current date)
set first_month to current_date
set month of first_month to January
(1 + (current_date - first_month + 1314864) div 2629728)
--> 2 (only in February :-)
JJ
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.