• 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
do shell script date with last month's date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

do shell script date with last month's date


  • Subject: do shell script date with last month's date
  • From: JF <email@hidden>
  • Date: Fri, 14 Feb 2014 13:10:46 +0000

Hello
I am using this to put a date into the subject of an email created by an applescript.
do shell script "date +'%B %Y'" which gives me "February 2014" for this month's emails

However, some of my emails require last month's date, so for emails sent in February the output should be "January 2014"
I have tried:
do shell script "date +'%B -1 month %Y'"
but the output is "February -1 month 2014"".
Also any variations I have tried do not work either. I have searched for this on the Internet but have found none, except masses of Unix code lines which I am sure are not required for this simple shell script.

Can someone help me with this?

TIA
	James


 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: do shell script date with last month's date
      • From: "koenig.yvan" <email@hidden>
    • Re: do shell script date with last month's date
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Upgrading to Mavericks - is it likely to break EVERYTHING!?
  • Next by Date: Re: Flattening Scripts
  • Previous by thread: Re: Flattening Scripts
  • Next by thread: Re: do shell script date with last month's date
  • Index(es):
    • Date
    • Thread