On or near 1/16/02 12:24 PM, Barry Wainwright at [EMAIL PROTECTED] observed:

>> I wrote a script for Entourage to do this a bit more carefully (also
>> resetting the text item delimiters properly, which any script should
>> do, Barry--tsk, tsk!).
> 
> this is a philosophical discussion :)

True.
>> However, that time is expressed in a format that AppleScript does
>> not understand, and with a GMT offset so it is the sender's local
>> time. Accordingly, my script reformats it in an AppleScript date
>> format, adjusts it back to GMT and then to the receiver's local time.
> 
> A continuation line is one that starts with a whitespace character
> according to the rfc. So, all you need to do is replace all
> cr/whitespace pairs with just the whitespace before carrying out your
> search. Then all the headers will be in one paragraph each.

Ah! Thanks for that tip.
> Oops. many received header date stamps are formatted like this : "
> Wed, 16 Jan 2002 19:22:21 +0000 (GMT)" or this  "Wed, 16 Jan 2002
> 11:23:18 -0800 (PST)" - in this case, your 'last word' will get "GMT"
> or "PST" (without the parentheses as well!)
> 
> now this next bit...
> 
>>     --Now reformat the damned date stamp to something Applescript
>> can understand
> 
> can be done by saying "Date x" - it will format all it can understand
> and ignore the GMT offset at the end. For some reason, 'x as date'
> doesn't work???
> 
> set x to "Wed, 16 Jan 2002 11:23:18 -0800 (PST)"
> date x
>  --  date "Wednesday, January 16, 2002 11:23:18 am"

Ah! again. Something I once knew but forgot, and when I tried "x as date"
and it did not work, I just used the brute force method. Much better.

-- 
Microsoft MVP for Entourage/OE/Word
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
Applescripts for Outlook Express and Entourage:
<http://homepage.mac.com/allenwatson/>


-- 
To unsubscribe:                     
<mailto:[EMAIL PROTECTED]>
archives:       
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:       
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to