[racket-dev] racket/date, SRFI-19, date construction

From: John Clements (clements at brinckerhoff.org)
Date: Fri Jan 11 14:34:45 EST 2013

On Jan 11, 2013, at 10:53 AM, Pierpaolo Bernardi wrote:

> On Fri, Jan 11, 2013 at 7:04 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> 
>> Note: in the long run, it's probably best to have a comprehensive
>> srfi/19 replacement in racket/date,
> 
> Agreed.
> 
> srfi/19 also has some serious flaws, which I have no time at the
> moment to delve into.
> The one merit it has, is that being an srfi is meant to be a portable
> specification.
> 
> I suggest to disregard srfi/19 as a source of inspiration.

I don't like SRFI 19.  However, there's one thing it does that racket/date doesn't, which is to provide a way to do string->date.  I'm not at all convinced that it does a good job of string->date, but it does have these functions. 

> 
> You may want to look instead at (the time related parts of) SOFA
> (www.iausofa.org).
> 
> For my needs, I'm working at an FFI interface to SOFA, which I'll
> release on planet when ready.

I much prefer pure racket code to FFI stuff--fewer cross-platform issues, install issues, etc. With that said, it certainly looks like SOFA is the right source for standards and definitions.

John



Posted on the dev mailing list.