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

Re: shell script date


  • Subject: Re: shell script date
  • From: has <email@hidden>
  • Date: Thu, 24 Feb 2005 18:32:25 +0000

Christian Vinaa wrote:

the DATE  shell script  where the syntax is explained:

http://lists.apple.com/archives/applescript-users/2002/Mar/msg01245.html

however  the month !     &m  gives my   02   but what is the code to
ditch any zero in front ?

There isn't one (that's Unix for you). See man strftime for the available codes. For friendlier date formatting you might try AppleMods' Date library <http://applemods.sourceforge.net>; for example (auto-generated library loading code omitted for clarity):


	set fmt to _Date's makeFormatter("m/d/yy h:MM:SS tt")
	fmt's currentDate()
	--> "2/24/05 6:25:07 pm"

HTH

has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: shell script date
  • Next by Date: Re: Mutiple if and then for one value
  • Previous by thread: shell script date
  • Next by thread: to disable applescript
  • Index(es):
    • Date
    • Thread