• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Time anomaly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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...

-- 
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

  • Follow-Ups:
    • Re: Time anomaly
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Time anomaly (From: Miguel Torikachvili <email@hidden>)
 >Re: Time anomaly (From: Ron Hunsinger <email@hidden>)
 >Re: Time anomaly (From: Thomas Fischer <email@hidden>)
 >Re: Time anomaly (From: Michelle Steiner <email@hidden>)
 >Re: Time anomaly (From: Jon Pugh <email@hidden>)

  • Prev by Date: Re: Time anomaly
  • Next by Date: Re: Time anomaly
  • Previous by thread: Re: Time anomaly
  • Next by thread: Re: Time anomaly
  • Index(es):
    • Date
    • Thread