[racket-dev] (current-date)

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Wed Jan 30 22:23:04 EST 2013

On 2013-01-30 23:20:45 +0100, Pierpaolo Bernardi wrote:
>    Any reason not to define current-date in this way? there's a nanosecond
>    field there wanting to get into action.

While we're on the subject, it's also weird that `date->seconds` has a
contract accepting date? and so doesn't handle date*'s extra nanosecond
field (note that `seconds->date` produces date*s):

  Welcome to Racket v5.3.2.3.
  -> (require racket/date)
  -> (define s (* #i1/1000 (current-inexact-milliseconds)))
  -> s
  1359602380.5059009
  -> (date->seconds (seconds->date s))
  1359602380

(someone on #racket gets the credit for noticing this, but I don't
 remember who)

Cheers,
Asumu

Posted on the dev mailing list.