Re: do shell script date with last month's date
Re: do shell script date with last month's date
- Subject: Re: do shell script date with last month's date
- From: "koenig.yvan" <email@hidden>
- Date: Fri, 14 Feb 2014 14:35:03 +0100
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
set fake to current date set day of fake to 1 set fake to fake - (1 * days) set myString to (month of fake as text) & space & year of fake
I'm quite sure that it's faster than the code triggering do shell script
Yvan KOENIG (VALLAURIS, France) vendredi 14 février 2014 14:34:20
|
_______________________________________________
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