Re: Time anomaly
Re: Time anomaly
- Subject: Re: Time anomaly
- From: Shane Stanley <email@hidden>
- Date: Mon, 29 Oct 2012 08:44:04 +1100
On 29/10/2012, at 4:01 AM, Jon Pugh <email@hidden> wrote:
It was suggested to me that aside from the obvious “Don’t do that” recommendation,
Which, incidentally, applies to the code I posted. This sort of thing:
set month of now1 to ((themonth + 2) mod 12) + 1 set year of now1 to theYear + (themonth + 3) div 12
is going to be problematic if now1's day is, say, 31, and the month three months hence has fewer than 31 days. The whole idea of just changing the month is fraught.
the proper solution to these issues is to file a bug. It was speculatively considered that a probable solution would be to make AppleScript return a record of date/time elements, much as Cocoa does, which would allow you to modify those elements and then turn them back into a date, though I kind of like the idea of being able to just treat a date object’s properties as those elements, avoiding the whole “another data type” issue.
FWIW, if the powers that be are going to fiddle with dates, I'd really like to see real dates, with time zones. A person's allowed to dream... |
_______________________________________________
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