On Thu 18 September 2003, 17:33:28 +1000, John Phillips wrote:
> I use this macro in replies
> 
> %WRAPPED='%SETPATTREGEXP="(?m-s)^Date\:\s*?((.*?[\d]{4})\s*?([\d]{0,2}\:%-
> [\d]{0,2}\:[\d]{0,2})\s*?(.*))"%-
> %REGEXPBLINDMATCH="%HEADERS"%-
> On%SUBPATT="2", at %SUBPATT="3" [GMT%SUBPATT="4"] %-
> (which was %OTIME where I live) you wrote:'
> 
> which translates the received time to my local time (GMT +10).
> However if my day is one day ahead than the sending time (because of
> time zone differences), this is not indicated at all. Just the local
> time still.
> 
> Can a macro - RegExP expert help here?

Well, I don't claim to be a Regexp expert, but the following checks
the day in your timezone to the day in the sender's, and if they are
different, inserts your day and time, otherwise just your time.

%WRAPPED='%SETPATTREGEXP="(?m-s)^Date:\s*(((.*?),.*?[\d]{4})\s*([\d]{0,2}:%-
[\d]{0,2}:[\d]{0,2})\s*(.*))"%-
%REGEXPBLINDMATCH="%HEADERS"%-
On %SUBPATT="2", at %SUBPATT="4" [GMT%SUBPATT="5"] %-
(which was %-
%IF:_%SUBPATT="3"_<>_%ODate="ddd"_%-
:_%ODate="ddd, h:mm:ss"_%-
:_%ODate="h:mm:ss"_ where I live) you wrote:'

--
Robin Anson
Using The Bat! v2.00.6 on Windows XP 5.1 Build 2600
Service Pack 1




________________________________________________
Current version is 2.00 | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to