Re: [Scheme-reports] [scheme-reports-wg2] Date and time arithmetic library proposal for R7RS large Scheme John Cowan 22 Nov 2010 17:02 UTC

Neil Van Dyke scripsit:

> There are also important decisions to make, like the semantics of
> mixed-precision arithmetic on, say, time points.

Can you clarify this?

> A few years ago, I spent person-weeks implementing most of ISO 8601, and
> the API that I arrived at was necessarily (I felt) not nearly as neat
> and tidy as TimeAdvancedCowan.

I have another proposal in the works for periods, intervals, and recurring
intervals, but I consider them less complicated.  Note also that date
objects are broader than ISO 8601: they can contain values that don't
constitute time points, such as '((month . 4) (day-of-month . 2)).
XML Schema notates this as "--4-2", but I don't know why.

Can we have a pointer to docs for your implementation?  In standards work,
API buccaneering is a good thing.

Note: I have just added date->alist to get the fields out of a date
object in bulk.

> However, the experience has led me to believe that RnRS should make
> a conscious, informed decision of how much of ISO 8601 to support,
> even though the answer might be "only what Java does".

I looked at the official Java support, and it was a horrible mess, so I
worked from Joda Time instead.  It's overly complicated and Javaesque,
so I tried to boil it down as much as seemed feasible.

--
Kill Gorgun!  Kill orc-folk!            John Cowan
No other words please Wild Men.         cowan@ccil.org
Drive away bad air and darkness         http://www.ccil.org/~cowan
with bright iron!   --Ghan-buri-Ghan    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