Re: Dates
Re: Dates
- Subject: Re: Dates
- From: Michael <email@hidden>
- Date: Thu, 3 Jan 2008 06:19:26 -0800
Yes...you are correct of course....thank you. But, may I ask another
issue that has arisen. If the date sent is in a different time zone,
then Mail ( and I guess the system, presents the time in local
time...which makes sense. ( I assume it uses the settings as defined
by the user). So, if one compares two equivalent times, but in
different time zones, does the OS consider them equal ie the
string might be different, but the object date should be the same.
Here is what I am now using.
set msgs to every message of (mailbox "INBOX" of account "Foo") whose
(message id is "email@hidden") and (date sent is Date "Wed, 14 Nov 2007
15:12:15 +0100")
Now, I am in Time zone -8, so the time shown on that particular email
is different, but I would have thought that it would still select it.
I have not yet figured out why it is not selecting it, but it isn't.
Any insight would be helpful.
thank you all as usual.
Michael.
Hello Michael,
Just reading above code, it looks like the problem must be with:
(date sent is "Wednesday, January 2, 2008 3:22:23 PM")
Property 'date sent' is of class date, while "Wednesday, January 2,
2008 3:22:23 PM" is a string.
The equality operator (i.e. the 'is' operator) always first checks
the classes of its operands: if their classes are not the same, the
operands are always considered as non equal.
As a result, your whose clause always evaluates to false.
Could you try with
(date sent is date "Wednesday, January 2, 2008 3:22:23 PM")
so that the second operand is of class date too?
HTH,
Axel
_
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Dates (From: Michael <email@hidden>) |
| >Re: Dates (From: Michelle Steiner <email@hidden>) |
| >Re: Dates (From: Michael <email@hidden>) |
| >Re: Dates (From: Axel Luttgens <email@hidden>) |