• 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: System Date Format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Date Format


  • Subject: Re: System Date Format
  • From: Paul Berkowitz <email@hidden>
  • Date: Wed, 03 Sep 2003 21:20:20 -0700

On 9/3/03 8:56 PM, "bill" <email@hidden> wrote:

> -- system short date format
> do shell script "defaults read -g NSShortDateFormatString"
> -- "%Y-%m-%d"

Hmmm. OMM, where I have the typical US m/d/y without leading zeroes, this
comes back as

"%1m/%e/%y"

in Jaguar 10.2.6.

Unfortunately that "1m" does not appear to be standard Unix. If I run:

set dateFormat to do shell script "defaults read -g NSShortDateFormatString"
do shell script "date +" & dateFormat
--> "1m/ 3/03"

Not quite right... Maybe there's some strftime switch I can find to
substitute for "1m". Nope, it must be a "special" adaptation. Well, I can do
some AppleScript stuff now that I know what it means (remove the leading
zero, and the leading blank for %e). I'll need to try out several date
formats in System Prefs.

--
Paul Berkowitz
_______________________________________________
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.

References: 
 >Re: System Date Format (From: bill <email@hidden>)

  • Prev by Date: Re: System Date Format
  • Next by Date: Re: System Date Format-follow-up
  • Previous by thread: Re: System Date Format
  • Next by thread: Re: System Date Format
  • Index(es):
    • Date
    • Thread