• 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: find yesterday date using date command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find yesterday date using date command


  • Subject: Re: find yesterday date using date command
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 1 Jan 2007 19:12:44 -0500

The OP did ask for how to do this with the "date command"; assuming
that the shell command date(1) was actually intended, the result may
be achieved thus:

do shell script "date -r $(( $(date +%s) - 86400 ))"

Although if you have the GNU coreutils package installed (e.g. in
/sw/bin/ via fink, or in /opt/local/bin via MacPorts), it's a little
easier:

do shell script "/sw/bin/date -d yesterday"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: find yesterday date using date command
      • From: Hung Phan <email@hidden>
References: 
 >find yesterday date using date command (From: Hung Phan <email@hidden>)

  • Prev by Date: Re: Irritating list reply-to policy
  • Next by Date: Re: Irritating list reply-to policy
  • Previous by thread: Re: find yesterday date using date command
  • Next by thread: Re: find yesterday date using date command
  • Index(es):
    • Date
    • Thread