FWIW I did some sort of port of SRFI/19 to Typed Racket. I recall doing something along the lines of bridging the impedance mismatch between Racket and the SRFI, but whatever it was, was minimal. I was in a hurry. If anyone is interested.
- date.rkt was a standard TR require/typed wrapping of srfi-19 https://github.com/RayRacine/racketlib/blob/master/prelude/type/date.rkt<https://github.com/RayRacine/racketlib/blob/master/prelude/type/datetime.rkt> - datetime.rkt was intended to be a reasonable update of srfi-19 as a standard TR module based on Racket idioms, native apis. I did just enough to get those functions I needed and that was it. One thing I do recall is the that Leap Second table in srfi-19 was somewhat out of date. https://github.com/RayRacine/racketlib/blob/master/prelude/type/datetime.rkt Ray On Fri, Jan 11, 2013 at 1:04 PM, Asumu Takikawa <as...@ccs.neu.edu> wrote: > Hi all, > > I had a few design questions about date types as used in the racket/date > and srfi/19 libraries. > > First, for some reason racket/date and srfi/19 use mutually incompatible > date representations and this is noted in the documentation (so it's > intentional). Is there a good reason for this? As far as I can tell, it > should be technically do-able to make srfi/19 use `date*` (for > nanoseconds) and thus be compatible with racket/date functions. > > Second, the date structure used by racket/date has some seemingly > extraneous fields. For example, `week-day` and `year-day` can be > calculated from the rest of the fields and aren't necessary (this is > annoying if you want to construct your own dates manually). > > Changing the structure is clearly a non-solution, but how about > exporting a different `make-date` constructor that makes `week-day`, > `year-day`, `dst?`, and `time-zone-offset` optional and default to > something sensible? > > Note: in the long run, it's probably best to have a comprehensive > srfi/19 replacement in racket/date, but in the meantime it'd be nice to > have a stopgap measure. > > Cheers, > Asumu > _________________________ > Racket Developers list: > http://lists.racket-lang.org/dev >
_________________________ Racket Developers list: http://lists.racket-lang.org/dev