# Date Stamp

On LinkPattern, DaveSmith talked about adding digits to the link pattern. ChrisGarrod hacked the following code together on his experimental wiki. Using a single number to represent any point on the timeline made him year10k compliant years ago: http://igpp.ucsd.edu/~garrod/y10k/!

A DateStamp uses our current calendar, right now in SanDiego, it's 20030927.1358 -- That's all the digits of accuracy I can see from where I sit.

The code below is ?IlliterateProgramming, it recognizes dates only between 1900 and 2000. Some times can be misrecognized as DateStamps. It also allows for every year to have a February 29th. Is there an elegant way to correct for leap year?

``` \$digit="[0-9]";
\$sixty="[0-5]\$digit";	   # leap seconds ignored
\$seconds="\$sixty\$digit*";       # seconds to any precision
\$hours="[01]\$digit|2[0-3]";     # 0..23
\$time="\$hours(\$sixty(\$seconds)?)?";
\$AndTime=".\$time";
\$ohTwo="[0-2]";
\$twelve="(0\$digit|1\$ohTwo)";    # allow month 00 and day 00 reasons later
\$twentynine="(\$twelve)\$ohTwo\$digit";    # all months can sometimes have 29
\$thirty="(0[13-9]|1\$ohTwo)30";	  # except February
\$thirtyone="(0[13578]|1[02])31";	# and most have 31
\$MonthDays="(\$twentynine|\$thirty|\$thirtyone)";  #mmdd
\$RecentYear="(19|20)\$digit\$digit";
\$DateStamp="\$RecentYear(\$twelve|\$MonthDays(\$AndTime)?)?";