• 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: Arcane date smarts (Was: Getting a folder based on creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arcane date smarts (Was: Getting a folder based on creation


  • Subject: Re: Arcane date smarts (Was: Getting a folder based on creation
  • From: Nigel Garvey <email@hidden>
  • Date: Thu, 1 Nov 2001 00:25:32 +0000

Richard Morton wrote on Thu, 1 Nov 2001 09:45:28 +1100:

>Nigel Garvey's message of 31/10/01 11:26 PM contained:
>
>>> set today to (date "12:00:00 AM") of (current date)
>>
>>Wow! I've never seen anything like that. A date of another date!
>
>I wondered if that would catch your attention Nigel. :-}

Richard! Where have you been? :-)

>> date "17" of date "6:30"
>> --> Compiles (today) as: date "Wednesday, 17 October 2001 06:30:00"
>>
>>Is this a bug or a feature?
>
>I don't know, but I'd say the latter. As we've seen before, AS has some
>very cool date smarts. All sorts of partial date strings evaluate in a,
>usually, predictable way. I wonder who was responsible for that. Does
>anybody know?

It's a brilliantly clever system. :-)

>>By the way, it's still about five times as fast to set midnight of the
>>current date in the conventional way:
>>
>> set today to (current date)
>> set today's time to 0
>
>Or if you want it really fast - without any call to 'current date':
>
>set firstMoment to "12AM"
>set today to date firstMoment
>--> date "Thursday, 1 November 2001 12:00:00 AM"
>
> Any less info than "12AM" and it takes the number as being the day.

We-e-ll, I still reckon my way has the edge, but there's not much in it.
But hey! Have you tried date "0"?

NG


  • Prev by Date: Re: Does "rounding" work in OS 9.2.1
  • Next by Date: Re: Does "rounding" work in OS 9.2.1
  • Previous by thread: Re: Does "rounding" work in OS 9.2.1
  • Next by thread: Re: Arcane date smarts (Was: Getting a folder based on creation
  • Index(es):
    • Date
    • Thread