[local-time-devel] A new release & possible extensions

Marijn Haverbeke marijnh at gmail.com
Thu Feb 15 12:57:38 UTC 2007


Hello list,

A while ago I ended up implementing a simple date/time library to
supplement a database interface library
(http://common-lisp.net/project/postmodern). I considered using
local-time, but didn't for two reasons:

- Lack of support for non-Unix platforms
- No separate types for dates and timestamps, no interval type

Attila told me that he has pushed patches that fix the first problem.
Would it be considered a good idea if I made a patch that adds a
separate date type (for more straightforward mapping between lisp and
SQL types), and an interval type? I saw something about intervals in
the TODO file. Here is how my simple-date lib, and Postgresql,
approach intervals: They consist of a millisecond part and a month
part. When creating one, the user can specify an amount milliseconds,
seconds, minutes, hours, days, weeks, months, and years. All of these
except the last two are incorporated in the millisecond part, and the
last two in the month part. Intervals can be added and subtracted from
dates and timestamps, first the millisecond part is added, and then it
shifts the month part, making sure that it doesn't end up on something
like feb 30th.

If local-time takes leap seconds into consideration this would be more
involved though (does it?).

So, if you like these suggestions, and once I get around to
implementing them, local-time would be a good replacement for my own
timezone-ignorant library in Postmodern. At that point it would be
nice if a new asdf-installable release was made, so that users of my
lib do not have to dig in repositories to fetch dependencies, but I
suppose that wouldn't be too hard to arrange.

Regards,
Marijn



More information about the local-time-devel mailing list