• 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: Jeff Jungblut <email@hidden>
  • Date: Sat, 15 Mar 2008 14:42:24 -0700
  • Thread-topic: Date math problem in Leopard

on 3/15/08 10:43 AM, Mark J. Reed at email@hidden wrote:

> On Sat, Mar 15, 2008 at 1:36 PM, Mark J. Reed <email@hidden> wrote:
>>  set newDate to do shell script "perl -le 'print ~~localtime(567320400
>>  + " & newIssue & " * " & weeks & ")'"
>
> Whups, sorry, that just gets you a string.  Try this:
>
> set newDate to date (do shell script "perl -MPOSIX -le 'print
> strftime(\"%A, %B %d, %Y %I:%M:%S %p\", localtime (567320400 + " &
> newIssue & " * " & weeks & "))'")

Thanks so much for that. I changed the constant to 567331200 (567320400 came
up as 9:00 PM Wednesday on my system -- time zone difference?) and now it
correctly produces a Thursday date.

--
Jeff Jungblut
email@hidden
Senior Graphic Designer & Web Developer
Uptown Publications


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

  • Prev by Date: Re: Path to Document in Script Editor
  • Next by Date: Re: Path to Document in Script Editor
  • Previous by thread: Re: Date math problem in Leopard
  • Next by thread: Re: Date math problem in Leopard
  • Index(es):
    • Date
    • Thread