[racket] Converting a date to seconds

From: Mark Carter (mcturra2000 at yahoo.co.uk)
Date: Sun Jul 31 06:47:13 EDT 2011

I'm trying to do a calculation which requires converting a date into years.

Converting a date into seconds is OK, too.

The problem is, there doesn't seem to be a good way of doing this in Racket. 


There is a date->seconds function, which looks useful. However, the make-date function takes in a week-day and year-day - which I don't know. I just want to pass in a year, month and day. I have no idea what weekday it is.

The alternative would be to use srfi/19, which has a usable make-date function, but doesn't seem to be able to convert that to seconds.

Any ideas what I need to do to accomplish this?




Posted on the users mailing list.