[racket] Question: struct lax-date

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Sun Dec 15 19:53:38 EST 2013

On 2013-12-15 19:49:55 -0500, Asumu Takikawa wrote:
> Try something like:
>   -> (date-day (string->date "Feb 11 11:20" "~b ~d ~H:~M"))
>   11

I should note that this only works if you have the `srfi/19` copy of the
`date-day` (and other) function.

Example:
  -> (require (only-in srfi/19 string->date))
  -> (date-day (string->date "Feb 11 11:20" "~b ~d ~H:~M"))
  ; date-day: contract violation
  ;   expected: date?
  ;   given: (lax-date 0 0 20 11 11 2 #t -18000)
  ; [,bt for context]

Just make sure you use the right date accessor functions if you expect
lax date structs.

Cheers,
Asumu

Posted on the users mailing list.