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

Re: Date problems


  • Subject: Re: Date problems
  • From: John Delacour <email@hidden>
  • Date: Mon, 26 Aug 2002 17:59:57 +0100

At 9:36 pm -1000 25/8/02, Reinhold Penner wrote:

There's an additional headache with this, since I have no idea how
language-specific these date coercions are anyway. For example, if I
process myDate to something that can be coerced to a date on my US
system, will that also work on a user's computer that has French or
German date settings? If not, how can I convert the above myDate into
something that every Mac can recognize as a date?

For a long time now it has been possible to convert any _unambiguous_and_valid_ string into a 'date'. You will be surprised what will work. I've a feeling it has been even more flexible in the past...

set ls to {}
repeat with s in paragraphs of "1
1 may
1 aug 2001
13 janu 1991
4 45
jul 16 03
1.1.1918"
set end of ls to date s
end repeat
set text item delimiters to return
ls as string

-----

(current date) - (date "1/1/1904")

will also give you the date as a number.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Date problems
      • From: Reinhold Penner <email@hidden>
References: 
 >Date problems (From: Reinhold Penner <email@hidden>)

  • Prev by Date: Re: Entourage question
  • Next by Date: Re: New Address Book in Jaguar 10.2...
  • Previous by thread: Re: Date problems
  • Next by thread: Re: Date problems
  • Index(es):
    • Date
    • Thread