Good evening Newsacct !

  
On Tue, 4 Mar 2003 15:54:44 -0500 GMT your local time,
which was 04.03.2003, 21:54 (GMT+0100) where I live, you (Newsacct Newsacct)
wrote in mid:[EMAIL PROTECTED]:


> I   was  hoping  all  you  experts  with  the  templates  and  regular
> expressions could help me figure out how to do a countdown clock in my
> signature.

> In  this  case,  we are going to Disney in September and I want to say
> something  like,  "144  days,  12  hours, 34 minutes till we leave for
> Disney!"

Well, I can't provide counting hours, but I wrote something about
counting down days:


,---------- [ <[EMAIL PROTECTED]> ]
| ok, here we go: there is a set of macros you need to get the days  
| counted. I didn't write these (Carsten, was it you?) nevertheless it  
| counts days in the future but it also works on past events.  
|   
| 1. QT "datediff"  
|   
| %If:_%Comment_>=_%Date='yyyymmdd'_:%-  
| _%comment="a%Comment%-b%Date='yyyymmdd'c0;"_:%-  
| _%comment="a%date='yyyymmdd'b%Comment%c0;"_%-  
| %qinclude="datediff_r"%-  
| %comment=""  
|   
|   
| 2. QT "datediff_addmonth"  
|   
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="12":"%-  
| %Calc=!%SetPattRegexp='b(....)'%RegexpMatch='%Comment'+1!":"%-  
| %SetPattRegexp='b(....)'%RegexpMatch='%Comment'"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="01":"02"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="02":"03"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="03":"04"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="04":"05"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="05":"06"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="06":"07"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="07":"08"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="08":"09"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="09":"10"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="10":"11"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="11":"12"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="12":"01"%-  
| %SetPattRegexp='b......(..)'%RegexpMatch='%Comment'  
|   
|   
| 3. QT: "datediff_days"  
|   
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="01":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="03":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="04":"30"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="05":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="06":"30"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="07":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="08":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="09":"30"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="10":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="11":"30"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="12":"31"%-  
| %If:"%SetPattRegexp='b....(..)'%RegexpMatch='%Comment'"="02":"%-  
| %If:_%SetPattRegexp=$\D$%RegexpMatch=$%-  
| %Calc=#%SetPattRegexp='b(....)'%RegexpMatch='%Comment'/4#$_=__:%-  
| _%If:#%SetPattRegexp='b..(..)'%RegexpMatch='%Comment'#=#00#:%-  
| #%If:~%SetPattRegexp='b(28|24|20|16|12|08|04|00)'%-  
| %RegexpMatch='%Comment'~<>~~:~29~:~28~#:%-  
| #29#_:_28_"  
|   
|   
| 4. QT: "datediff_r"  
|   
| %REM="Test, ist JJJJMM der beiden Datumswerte identisch?"%-  
| %IF:%-  
| "%SetPattRegexp='a(......)'%RegexpMatch='%Comment'"<=%-  
| "%SetPattRegexp='b(......)'%RegexpMatch='%Comment'%-  
| ":"%-  
| %Rem='Tage addieren/subtrahieren'%-  
| %Calc=_%-  
| %SetPattRegexp='c(.*?);'%RegexpMatch='%Comment'%-  
| +%SetPattRegexp='a......(..)'%RegexpMatch='%Comment'%-  
| -%SetPattRegexp='b......(..)'%RegexpMatch='%Comment'_%-  
| ":"%-  
| %Rem='Monate in Tage umrechnen'%-  
| %Comment='%SetPattRegexp=_(a.*b)_%RegExpMatch=_%Comment_%-  
| %QInclude=!datediff_addmonth!%-  
| c%Calc=!%QInclude=#datediff_days# + 
%SetPattRegexp=_c(.*?);_%RegexpMatch=_%Comment_!;'%-  
| %QInclude=!datediff_r!"%-  
|   
|   
|   
| 5. QT: "Differenz"  
|   
| %Comment="20020101"%-  
| Since %Qinclude="datediff" days we are a couple  
| 
'----------

HTH


-- 
Best regards,
 Gerd 
=======================================================
Tutorial for using regular expressions with TheBat! www.regenechsen.de
-------------------------------------------------------
Reading is sometimes an ingenious device for avoiding thought.
-------------------------------------------------------
now playing: WDR2 :-)


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

Reply via email to