[ANN] Chronology Package on Squeak Map v1.2
Brent Pinkney
brent.pinkney at aircom.co.za
Thu Sep 25 06:27:15 UTC 2003
Hi,
>
> Week startDay: #Monday
>
> Week nameOfDay: 1 --> #Sunday
> Week startDay --> #Monday
>
> shouldn't the last two statements both evaluate to #Monday?
>
I am not sure.
The ANSI standard for the DateAndTime protocol reads:
5.8.1.9 Message: dayOfWeek
Synopsis
Answer the number of the day in the week, in the local time of the
receiver, which includes the receiver.
Definition: <DateAndTime>
Answer an <integer> between 1 and 7 inclusive representing the number of
the day in the week, in
the local time of the receiver, which includes the receiver. Sunday is 1,
Monday is 2, and so on.
Return Values
<integer> unspecified
Errors
None
So I deliberately implemented Week>>nameOfDay: to satisfy the standard.
Note. This is the ONE method that has changed with the introductuon of the
Chronology package. Smalltalk 80 has Monday as day 1.
PS. New package with Chris Muller's Stopwatch functionality coming soon.
Cheers
More information about the Squeak-dev
mailing list
|