Re: A few questions about dates
Re: A few questions about dates
- Subject: Re: A few questions about dates
- From: kai <email@hidden>
- Date: Sun, 27 Aug 2006 03:27:21 +0100
On 27 Aug 2006, at 03:07, Michelle Steiner wrote:
set today to (current date)
I then use it for various forms of date comparisons. The reason I
do this is that current date returns the date, exact to the second,
each time it is called, so if you call it more than once in a
script, it may give different results each time.
It's also more efficient to make just that one external call.
set x to "july 4, 1776"
set y to "July 4, 2006"
set z to (current date) - (date x)
(z / days) / 365.24
--> 230.14674077826
But that is some 53 days off; when did the US move from the Julian
calendar to the Gregorian? And how many days difference did that
cause?
set x to "july 4, 1776"
set y to "July 4, 2006"
set z to (date y) - (date x)
z mod (days * 365.24) / days
--> 365.04
:-)
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden