• 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
current date - 1 day?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

current date - 1 day?


  • Subject: current date - 1 day?
  • From: Stephen Schaefer <email@hidden>
  • Date: Tue, 17 Feb 2004 01:59:46 -0500

Probably simple newbie question, so hopefully a simple answer: why
does "yesterday" result in "-86383" instead of 16 (as in today is the
17th, so yesterday would be the 16th)? Thanks

set theDate to current date
set d to day of theDate
set m to month of theDate
set y to year of theDate
set ts to time string of theDate
set yesterday to (d) - (1 * days)
set mesg to "Here's info about today:" & return & ,
"time: " & ts & return & ,
"day: " & d & return & ,
"month: " & m & return & ,
"year: " & y & return & ,
"yesterday: " & yesterday & return
display dialog mesg
_______________________________________________
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: current date - 1 day?
      • From: Graff <email@hidden>
    • Re: current date - 1 day?
      • From: Matthew Smith <email@hidden>
    • Re: current date - 1 day?
      • From: Michelle Steiner <email@hidden>
    • Re: current date - 1 day?
      • From: "John W. Baxter" <email@hidden>
References: 
 >RE: Shell: put sed script in Applescript (From: "Reese, Steve" <email@hidden>)

  • Prev by Date: Re: Launching TextEdit with a TEXT document
  • Next by Date: Re: Launching TextEdit with a TEXT document
  • Previous by thread: RE: Shell: put sed script in Applescript
  • Next by thread: Re: current date - 1 day?
  • Index(es):
    • Date
    • Thread