[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] [r6rs-discuss] Date and time arithmetic library proposal for R7RS large Scheme
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
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports