[m-rev.] calendar module proposal

Peter Ross pdross at gmail.com
Tue Jan 27 17:10:32 AEDT 2009


On Tue, Jan 27, 2009 at 5:01 PM, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> On Tue, Jan 27, 2009 at 04:02:11PM +1100, Ian MacLarty wrote:
>> Hi,
>>
>> Here's a proposal for a calendar module for the standard library.
>> Could interested people take a look and give me some feedback?
>> Since this module only implements the Gregorian calendar, it might not
>> be suitable for working with dates prior to 1582.  Perhaps it should be
>> renamed to gregorian_calendar or gcalendar?
>
> I'd prefer gregorian_calendar.
>
>> Index: library/calendar.m
>> ===================================================================
>> RCS file: library/calendar.m
>> diff -N library/calendar.m
>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>> +++ library/calendar.m        27 Jan 2009 03:51:25 -0000
>> @@ -0,0 +1,961 @@

>> +
>> +:- type day_of_week
>> +    --->    sunday
>> +    ;       monday
>> +    ;       tuesday
>> +    ;       wednesday
>> +    ;       thursday
>> +    ;       friday
>> +    ;       saturday.
>
> IMHO a week starts on Monday, so sunday should sort after monday (after
> saturday), but I'm not sure what is 'official'.
>
The ISO prescribes Monday as the first day of the week with ISO-8601
for software date formats.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list