Permalink
Browse files

TODO file

  • Loading branch information...
1 parent c7df61d commit 8c8aac75849f31b19c9de83617e9435ad2baac59 @attila-lendvai attila-lendvai committed with attila-lendvai Apr 20, 2010
Showing with 63 additions and 2 deletions.
  1. +63 −2 TODO
View
@@ -11,8 +11,69 @@
- Integrate local-time with http://common-lisp.net/project/cl-l10n/
Also drop time/timezone related functionality from cl-l10n.
-- Make local-time work with olsen timezone rules
+- Make local-time work with olson timezone rules
+ http://www.twinsun.com/tz/tz-link.htm
Right now, we're using zic compiled files, which have a limited
scope. They may also be larger than the corresponding rule files.
-- Support timespecs
+- Support timespecs
+
+******
+
+Attila: i think we identified a bit of confusion in the code which
+i'll try to sum up here.
+
+first of all many of the operations currently defined on timestamps
+should not really be defined on timestamps at all. i think this is due
+to some heritage from the times when a timestamp value also had a
+timezone value attached to it.
+
+examples of such bogus operations are timestamp+, timestamp-, all
+adjust-timestamp variants that operate on the components of a date
+value, etc.
+
+let's define the nomenclature first:
+------------------------------------
+
+ - timestamp: a value representing a sharp cut on the continuous t
+axis (as in physics) of time, and as that it is mostly unrelated
+to timezones and dates.
+
+ - calendar: defines an encoding how to denote a timestamp using a
+set of numbers (called year, month, day, etc). there are various such
+encodings like the Gregorian calendar, or the Julian calendar (which
+was in effect in Russia until 1922!). wikipedia has loads of info
+about these.
+
+ - date: tightly coupled with a calendar, contains an optional
+timezone and a possibly partial set of the above mentioned
+numbers. note that this is a bit more flexible than what the everyday
+usage of the word 'date' suggests. but i'm open for alternative names!
+java calls it as 'calendar', which is not completely nuts as it's just
+a bunch of numbers without defining the encoding, namely the calendar
+rules.
+
+operations defined on timestamps:
+---------------------------------
+
+ - set or offset the unit of the time axis, namely seconds.
+
+ - convert to/from date (only in the context of a mandatory calendar
+and a mandatory timezone)
+
+operations defined on dates:
+----------------------------
+
+ - parse from string representation, e.g. an rfc3339 string. note that
+such a timestring does not necessarily describe a timestamp
+completely. it only does so when it contains all the components down
+to seconds, contains a timezone offset and a calendar is also provided.
+
+ - set/offset any component of it, although what those operations mean
+potentially depend on the mandatory calendar and the optional timezone
+ value in it. also note that some operations are potentially undefined
+and signal an error with certain date values (e.g. illegal combination
+of numbers describing a valid date)
+
+ - convert to/from a timestamp (strictly in the context of a calendar
+and a timezone)

0 comments on commit 8c8aac7

Please sign in to comment.