• 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/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date/Snow Leopard changed


  • Subject: Re: date/Snow Leopard changed
  • From: Emmanuel LEVY <email@hidden>
  • Date: Wed, 9 Sep 2009 12:51:13 +0200

On Sep 8, 2009, at 7:58 PM, Deivy Petrescu wrote:

(current date) as «class isot»  as string    (chevrons in both cases)

---> "2009-09-08T13:57:10"

So you know how to get the year, month and day.

The problem is, as far as I know, you can not write a isodate!

... except if you can install Satimage.osax, which has strftime and strptime to handle dates thoroughly.


strftime (current date) into "%FT%T"
--> "2009-09-09T12:46:57"

strptime "2009-09-09T12:46:57" encoding "%FT%T"
--> date "Wednesday, September 9, 2009 12:46:57 PM"

strptime "2009-09-09T12:46:57" encoding "%FT%T" with GMT
--> date "Wednesday, September 9, 2009 10:46:57 AM" -- I'm GMT+2

The documentation for the formats is in man strftime.

Emmanuel _______________________________________________
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: date/Snow Leopard changed
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: date/Snow Leopard changed (From: "Nigel Garvey" <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Mark J. Reed" <email@hidden>)
 >Re: date/Snow Leopard changed (From: Deivy Marck Petrescu <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: Deivy Marck Petrescu <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Most of my scripts are dying.
  • Next by Date: Re: [OT] Disclaimers [was:Re: Keith Bamford/IT/GMH is away on a course]
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread