Re: Date computation
Re: Date computation
- Subject: Re: Date computation
- From: yvan-koenig <email@hidden>
- Date: Fri, 7 Jan 2005 21:18:12 +0100
Hello
I plaid with Nigel code.
set d1 to "1/1/1007" (* here french format doesn't matter *)
set today to (current date)
set dd to "25/2/2005" (* CAUTION, I uses french format *)
set today to date (dd)
copy today to b
set b's day to 14
set secondXXday to b - (b - (date d1)) mod weeks
if secondXXday is less than or equal to today then
tell b to set {day, day} to {32, 14}
set secondXXday to b - (b - (date d1)) mod weeks
end if
display dialog "" & secondXXday & return & weekday of secondXXday
-- return secondXXday
I got a Wednesday
if I set d1 to "1/1/1001" I got a Thursday
if I set d1 to "1/1/1002" I got a Friday
if I set d1 to "1/1/1003" I got a Saturday
if I set d1 to "1/1/1004" I got a Sunday
if I set d1 to "1/1/1005" I got a Tuesday
if I set d1 to "1/1/1006" I got a Wednesday
if I set d1 to "1/1/1007" I got a Thursday
…
Never got a Monday ????
Yvan KOENIG
_______________________________________________
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