Shell script date & time coercions...
Shell script date & time coercions...
- Subject: Shell script date & time coercions...
- From: Mr Tea <email@hidden>
- Date: Sun, 31 Mar 2002 02:08:34 +0100
This from Matthew Stuckwisch - dated 30/3/02 05.56 pm:
>
set monthNum to do shell script "date +%m"
As others have already observed, 'Woo hoo!'
I had to try some other options. Aside from the obvious two...
"date +%d" -->"31"
"date +%y" -->"02"
...I also got these potentially useful results with a quick trawl through
the lower case alphabet...
"date +%a" --> "Sun"
"date +%b" --> "Mar"
"date +%c" -->"03/31/02 00:50:08"
"date +%h" -->"Mar"
"date +%j" -->"090"
"date +%l" -->"12"
"date +%p" -->"AM"
"date +%r" -->"12:54:29 AM"
"date +%s" -->"1017536118"
"date +%w" -->"0"
"date +%x" -->"03/31/02"
Are there others? And what do the results for j (090), s (1017536118) and w
(0) signify?
Regards,
Shell-shocked Mr Tea
_______________________________________________
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.