Time library design proposal

Bayley, Alistair Alistair_Bayley at ldn.invesco.com
Wed Feb 2 10:31:11 EST 2005


> From: Keean Schupke [mailto:k.schupke at imperial.ac.uk] 
> 
> data Gregorian = Gregorian {
>     second :: Int,
>     minute :: Int,
>     hour :: Int,
>     dayOfMonth :: Int,
>     dayOfWeek :: Int,
>     weekOfYear :: Int,
>     monthOfYear :: Int,
>     Year :: Int } -- enumerations may make more sense for 
> dayOfWeek/monthOfYear


I don't like the redundancy here. dayOfWeek and weekOfYear can (and should)
be derived from the dayOfMonth+monthOfYear+year. Having to specify them in
addition to the other fields is a major PITA, and one of the reasons the
current CalendarTime library is so unsavoury (why do I need to say what day
of the week it is? pah).

Alistair.

-----------------------------------------
*****************************************************************
Confidentiality Note: The information contained in this   message, and any
attachments, may contain confidential   and/or privileged material. It is
intended solely for the   person(s) or entity to which it is addressed. Any
review,   retransmission, dissemination, or taking of any action in
reliance upon this information by persons or entities other   than the
intended recipient(s) is prohibited. If you received  this in error, please
contact the sender and delete the   material from any computer.
*****************************************************************



More information about the Libraries mailing list