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

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


  • Follow-Ups:
    • Re: Date computation
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Date computation (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Date computation
  • Next by Date: Re: Date computation
  • Previous by thread: Re: Date computation
  • Next by thread: Re: Date computation
  • Index(es):
    • Date
    • Thread