• 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
date arithmetic weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

date arithmetic weirdness


  • Subject: date arithmetic weirdness
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 31 Mar 2002 19:44:31 -0700

When I try to run this script:

set a to "nov 3, 1997"
set b to "oct 9, 1997"
set c to "dec 1, 2002"

set foo to (date a) - (date b) --this line errors
set bar to (date c) - foo

I get this error

--> "Can't make date Thursday, October 9, 1997 12:00:00 AM" into a number or date.

But if I substitute the literal "oct 9, 1997" for b in that line, the script executes without problem.

--Michelle

We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: date arithmetic weirdness
      • From: John W Baxter <email@hidden>
    • Re: date arithmetic weirdness
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Extracting Text from aa Window
  • Next by Date: Re: date arithmetic weirdness
  • Previous by thread: Re: every process doesn´t work here
  • Next by thread: Re: date arithmetic weirdness
  • Index(es):
    • Date
    • Thread