• 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
read as date bug in 10.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read as date bug in 10.5


  • Subject: read as date bug in 10.5
  • From: Paul Berkowitz <email@hidden>
  • Date: Sat, 29 Mar 2008 16:15:35 -0700
  • Thread-topic: read as date bug in 10.5

OK, I finally upgraded to Leopard OS 10.5 on an Intel iMac.

I have now encountered the 'read as date' bug discussed here. Particularly
as I have a few shareware scripts that write dates to text files to
determine when to synchronize two applications (Entourage with iCal and
Address Book).

I discovered an entertaining curiosity which I don't think has been
mentioned here before. If you 'read as date' some portion of a text file
where a date object has been written to it, you get back the date,
invariably, as

    date "Thursday, January 1, 2004 12:00:00 AM"

But if you then check to see whether the date you retrieved

    = date "Thursday, January 1, 2004 12:00:00 AM"

the answer is always false. It's evidently inaccessible - too large - and
the result is just some sort of placeholder.

However you *can* get the date string of the bogus date. Here it is:

    set r to read alias fs as date -- list
    date string of r
    --> "Monday, December 19, 5828963"

That's always the answer, for any recent date. Hmmm.

    year of r

always results in an error -2702 (" The result of a numeric operation was
too large."). However

    r - (current date)
    --> 8.58247634364111E+18

Hmmm again.


--
Paul Berkowitz


 _______________________________________________
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: read as date bug in 10.5
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: AppleScript-Users Digest, Vol 5, Issue 203
  • Next by Date: Re: read as date bug in 10.5
  • Previous by thread: Re: AppleScript-Users Digest, Vol 5, Issue 203
  • Next by thread: Re: read as date bug in 10.5
  • Index(es):
    • Date
    • Thread