[plt-scheme] More dates...

From: geb a (geb_a at yahoo.com)
Date: Wed Aug 23 21:54:49 EDT 2006

Basically, I would like to find the julian day of a
given day month and year.  I have tried to create the
date two different ways and each has a problem... in
the first case I used SRFI 19.  The problem here is
that two even three fields are not easily determined. 
It would be nice if a function could calculate the
last three values (they are redundant date-week-day,
date-week-number ).

  (define first-date
   (date->julian-day 
    (make-date 0 0 0 8 5 9 2006 28800 ?? ??)))

This example uses the date.ss module.  In this example
there is no way of turning the julian day back into a
date in a convenient manner.  To make this more
complicated, the format for the julian day for these
two implementations are different (off by one).

  (define second-date
    (date->julian/scalinger 
                 (seconds->date 
                  (find-seconds 0 0 8 5 9 2006))))

 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Posted on the users mailing list.