• 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: Date math problem in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date math problem in Leopard


  • Subject: Re: Date math problem in Leopard
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 15 Mar 2008 13:36:42 -0400

On Fri, Mar 14, 2008 at 7:11 PM, Jeff Jungblut <email@hidden> wrote:
>         set firstIssue to date "Thursday, December 24, 1987 12:00:00 AM"
>         set newDate to firstIssue + ((newIssue) * weeks)
>         log newIssue -- value is 1056 to be published Mar. 20, 2008
>         log (newDate as text)

Here's a shell version that will work on both Tiger and Leopard,
requiring no extra software:

set newDate to do shell script "perl -le 'print ~~localtime(567320400
+ " & newIssue & " * " & weeks & ")'"


--
Mark J. Reed <email@hidden>
 _______________________________________________
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: Date math problem in Leopard
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Date math problem in Leopard (From: Jeff Jungblut <email@hidden>)

  • Prev by Date: Re: Date math problem in Leopard
  • Next by Date: Re: Date math problem in Leopard
  • Previous by thread: Re: Date math problem in Leopard
  • Next by thread: Re: Date math problem in Leopard
  • Index(es):
    • Date
    • Thread