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

Re: Date of next Thursday


  • Subject: Re: Date of next Thursday
  • From: Nigel Garvey <email@hidden>
  • Date: Thu, 16 Nov 2000 12:49:40 +0000

Nigel Garvey wrote on Thu, 16 Nov 2000 02:16:04 +0000:

[Quoting Michelle]:
>>On 11/15/00 3:17 PM, Nigel Garvey <email@hidden> wrote
>>
>>>set dref to date "Thursday, 6 January 2000 00:00:00"
>>>set nextThursday to dref + (round (((current date) - dref) / weeks)
>>>rounding up) * weeks

>In fact the formula could be made slightly more
>efficient,

> set dref to date "Thursday, 6 January 2000 00:00:00"
> set nextThursday to date string of ,
> (dref + ((current date) + weeks - dref) div weeks * weeks)

... and with even less maths:

set dref to date "Thursday, 6 January 2000 00:00:00"
tell (current date) to set nextThursday to date string of ,
(it + weeks - (it - dref) mod weeks)

(For digest readers, the "," is supposed to be a line-continuation
character.)

NG


  • Prev by Date: Count selected pixcel with Photoscripter
  • Next by Date: Newbie plea
  • Previous by thread: Re: Date of next Thursday
  • Next by thread: Re: Date of next Thursday
  • Index(es):
    • Date
    • Thread