Le 9 sept. 2009 à 12:51:13, Emmanuel LEVY a écrit :
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.
the thread is linked to Snow Leopard.