[racket] Parsing dates & times

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Mon Jul 14 23:39:52 EDT 2014

Short answer: For production use thus far, I usually use "string->date", 
something custom for the app, using regexps, my old simple 
"http://www.neilvandyke.org/rfc3339-scheme/", or the SRFI-19 implementation.

BTW, I try to limit my uses of date&time as much as possible, since none 
of the libraries are that complete, and coding yourself into a corner 
where you suddenly find you need to fill in a date library gap is a big 
time-consuming distraction from one's main goal.  (Date math is a 
surprising mess to get perfect, and even major software companies like 
MSFT have been found to ship buggy high-profile date math repeatedly.)  
For the limited uses I do make, the only real problem I've found with 
SRFI-19 is that their week-date conversions appear wrong by any of the 
week-numbering conventions I know.  (Thank you, unit testing, or I 
would've put incorrect week-number code into production, quite recently.)

(Incidentally, I also have an unreleased mother-of-all-time library, 
which implements pretty much all of ISO 8601, even the freaky 
pathological parts.  To be released once I get a chance to finalize the 
approach to arithmetic of timepoints in differing calendar systems 
and/or with different precision.  And scrape off the bit rot.)

Neil V.


Posted on the users mailing list.