New date bug [Re: Correcting AGE_INFO]
New date bug [Re: Correcting AGE_INFO]
- Subject: New date bug [Re: Correcting AGE_INFO]
- From: "Nigel Garvey" <email@hidden>
- Date: Fri, 5 Feb 2010 11:43:33 +0000
In my message of Thu, 4 Feb 2010 13:57:53 +0000, I wrote:
> property refMonday : date "Monday 1 January 1000 00:00:00"
Bert has pointed out to me off-list that the 1st January 1000 was a
Wednesday, which accords with my own memory(!). And so it is on my OS 9/
Jaguar and Tiger machines. But on my new MacBook Pro (with Snow
Leopard), date "1/1/1000" compiles as a Monday and its weekday is
returned as such.
The following dates compiled in Tiger…
date "Wednesday 1 January 1000 00:00:00"
date "Wednesday 1 January 1400 00:00:00"
date "Saturday 1 January 1600 00:00:00"
date "Wednesday 1 January 1800 00:00:00"
date "Wednesday 1 January 2200 00:00:00"
… appear thus when the script is opened in AppleScript Editor in Snow Leopard:
date "Wednesday 27 December 0999 00:00:00"
date "Wednesday 24 December 1399 00:00:00"
date "Saturday 1 January 1600 00:00:00"
date "Wednesday 1 January 1800 00:00:00"
date "Wednesday 1 January 2200 00:00:00"
One may theorise that some smart-arse has changed AppleScript's date
behaviour to follow the Julian calendar before some date in the past.
However, in that case, the 1600 date is wrong for my location because
Britain and its colonies didn't adopt the Gregorian calendar until 1752.
Even if the new behaviour is deliberate, it has to be regarded as a
discontinuity bug. Compiled scripts which depend on the day of the week
won't be affected, but any which depend on the actual date will.
Conversely, scripts posted in fora will have weekday problems when
compiled on earlier systems. (As in Bert's case here.)
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden