Time

Benjamin Franksen benjamin.franksen at bessy.de
Mon Jan 24 17:20:35 EST 2005


On Monday 24 January 2005 11:27, Keith Wansbrough wrote:
> > Rather than talk about specific Haskell code, I'd like to discuss the
> > measurement of time in general, how these concepts might be expressed in
> > Haskell, and what people might want from a time library. Rather than
> > propose anything, I want to try to ask some of the right questions.
>
> Wow, thanks for the impressive essay!

Yes, that was quite interesting to read.

> I think we should also consider some of the things people might want
> to do with these times.  In particular, people often want to compute
> with time differences: next week, next month, next year, etc.  These
> are calendar operations, and defining precisely what they mean in edge
> cases is often tricky.  Even discounting leap seconds and the like,
> "next month" is sometimes 28 days into the future, sometimes 29,
> sometimes 30, and sometimes 31 - and sometimes makes little sense:
> when is "31 January 2005 plus one month"?  

There are some references here. For instance, I remember reading that in 
Germany the term 'in one month' is defined by civil law to be the same day 
(number) in the next month. If such a day does not exist, the nearest 
existing day in this month is taken, i.e. with regard to March 31, 'one month 
later' is April 30.

Observing such laws or customs would be valuable for commercial applications. 
But different countries may have different customs (not to mention 
international law). Such things should be implementable on top of a general 
purpose library in a modular way.

Ben



More information about the Libraries mailing list