• 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: Counting & trashing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Counting & trashing


  • Subject: Re: Counting & trashing
  • From: Walter Ian Kaye <email@hidden>
  • Date: Tue, 13 Jul 2004 14:21:02 -0700

At 04:56p +0100 07/13/2004, Nigel Smith didst inscribe upon an electronic papyrus:

On 13/7/04 15:04, "Axel Luttgens" <email@hidden> wrote:

> From the ASLG:

> More recent date and time utilities use a 64-bit signed value that
> can represent dates from 30081 B.C. to 29940 A.D. However,
> AppleScript currently will not handle dates before 1/1/1000

Not strictly true, at least in OSX 10.3.x, though it doesn't handle BC
particularly well:

For example:

log (date "Wednesday, January 1, 1000 0:00:00") - 364877 * days
--> date "Monday, January 1, 0001 0:00:00"

log (date "Wednesday, January 1, 1000 0:00:00") - 364878 * days
--> date "Sunday, December 31, 0001 0:00:00"

So you can get earlier dates than 1/1/1000 on the fly, just not hard-coded.
I think... :-)

Particularly well... hehehe.
Setting the year to 0 does nothing; setting it to a negative number gives a coercion error. Which reminds me that the OS date structures use "epoch" but I don't see an epoch property in AS. Of course for date comparison purposes it would be useless anyhow, which may be why it's not accessible.


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


References: 
 >Re: Counting & trashing (From: Nigel Smith <email@hidden>)

  • Prev by Date: How to choose a specific scripting addtion's terms
  • Next by Date: Re: How to choose a specific scripting addtion's terms
  • Previous by thread: Re: Counting & trashing
  • Next by thread: Re: Counting & trashing
  • Index(es):
    • Date
    • Thread