• 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
Shell script date & time coercions...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Shell script date & time coercions...
      • From: John W Baxter <email@hidden>
    • Re: Shell script date & time coercions...
      • From: Applescript User Kreme <email@hidden>
References: 
 >Re: Quickie Question (From: Matthew Stuckwisch <email@hidden>)

  • Prev by Date: Numeric comparison in string
  • Next by Date: Re: Numeric comparison in string
  • Previous by thread: Re: Quickie Question
  • Next by thread: Re: Shell script date & time coercions...
  • Index(es):
    • Date
    • Thread