Re: [r6rs-discuss] Date and time arithmetic library proposal for R7RS large Scheme Christopher Chittleborough (23 Nov 2010 19:11 UTC)

Re: [r6rs-discuss] Date and time arithmetic library proposal for R7RS large Scheme Christopher Chittleborough 23 Nov 2010 17:44 UTC

This is a nice API for a subject that is much harder than generally
realized. Here are a few minor quibbles:

(chronology-with-time-zone CHRONOLOGY TIMEZONE)
  Presumably a "time zone name" is a string. Say so explicitly?

(date->instant DATE)
  What happens if there is not enough info in DATE to uniquely
  determine an instant? Signal an error? Return #f?

(date-field date FIELDNAME)
  Presumably FIELDNAME can be a symbol. Can it also be a string?

(date-increment date fieldname increment)
  Suggestion: instead of talking about incrementing the specified
  *field*, put it in terms of incrementing the *date* by the units
  (month/day/hour/...) corresponding to fieldname. Something like:
    Constructs and returns a new date object which is later than DATE by
    INCREMENT of the units specified by FIELDNAME (earlier if INCREMENT
    negative). For example, (date-increment date 'day-of-month 7) adds
    one week.

The 'century' values in the ISO chronology don't seem right.
If 1965 AD has century=19 in ISO, then 33 AD must have century=0
so 43 BC would have century=-1, not 0.

Cheers -- Chris Chittleborough

_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss