filters using dates

David S. Cargo (
Tue, 3 Feb 1998 11:11:05 -0600

Date: Tue, 3 Feb 1998 11:11:05 -0600
From: (David S. Cargo)
Message-Id: <>
Subject: filters using dates

I was just poking around looking at what might be necessary to
implement comparison of dates in tcl. I just happened to check
the comp.lang.tcl news group, and saw a mention of the tcl clock
command. If you look at "clock scan" and "clock format", you can
see that the format of dates in mail messages is easily scanned with
the "clock scan" command. This gives an integer that can be used
for comparisons.

You can get the equivalent format out with
clock format nnnnnnnnn -format "%a, %d %b %Y %H:%M:%S %Z"
where nnnnnnnnn is a clock value returned or compatible with
"clock scan".

Users would never see the internal date format; they would never
have to input the internal date format.

That makes implementation of the comparison code very straightforward.