Re: [Scheme-reports] [r6rs-discuss] Date and time arithmetic library proposal for R7RS large Scheme
John Cowan 23 Nov 2010 21:05 UTC
Christopher Chittleborough scripsit:
> (chronology-with-time-zone CHRONOLOGY TIMEZONE)
> Presumably a "time zone name" is a string. Say so explicitly?
I actually do say what it can be: an offset in minutes from UTC,
a string from the TZ database, or an implementation-defined alternative.
> (date->instant DATE)
> What happens if there is not enough info in DATE to uniquely
> determine an instant? Signal an error? Return #f?
Added "otherwise return #f".
> (date-field date FIELDNAME)
> Presumably FIELDNAME can be a symbol. Can it also be a string?
That would require an extra lookup at run time. I think symbols are sufficient.
> (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.
Excellent wording; adopted.
> 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.
Fixed.
--
So they play that [tune] on John Cowan
their fascist banjos, eh? cowan@ccil.org
--Great-Souled Sam http://www.ccil.org/~cowan
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports