Apology

Richard A. O'Keefe ok at atlas.otago.ac.nz
Tue Oct 31 03:18:58 UTC 2000


	Well, #toggleStartMonday or a preference retain optional ISO-8601 
	compliance.  And with many French and German calendars, BTW.
	
In German, Wednesday is called "Mittwoch".

ISO 8601 handles both Monday-origin and Sunday-origin weeks.
It's a while since I read it, so I don't recall whether it gives
a preference to one or the other.

toggleStartMonday is a really lousy interface.
If I want to have weeks starting on Sunday, as they have for >2000 years,
I have to do

	Week startMonday ifTrue: [Week toggleStartMonday].

I can well imagine people wanting to make sure Week will start with
Monday.  (It's basically ideological:  "the only days that really matter
are the work days".)  I can only too well imagine people wanting to make
sure Week will start with Sunday.  But it is extremely difficult to
invent a situation where someone wants to *change* which day of the week
is counted as first without knowing or caring what it is right now.

A better interface would be

	Week startsOn: #Monday
	Week startsOn: #Sunday

But the fundamental design mistake is having the interpretation of
weeks depend on a global mutable variable, as if Smalltalk had no
threads and as if no two Smalltalk programmers could ever disagree
about when weeks should start for the sake of their classes.

	As for what is the official start of the week, we might grant
	that it could depend on time, location, and faith.
	
But Squeak 2.8 does not grant that.  What is "official", anyway?
The C standard rules that the first day of the week is Sunday and
that it is numbered 0.  That's "official".

	Some time ago, I had a good laugh at 
	<http://zapatopi.net/metricweek.html>.

The idea of tying a fundamental unit of time to the erratic rotation
of one particular planet _is_ sufficiently farcical.  (So does the idea
of tying a fundamental unit of length to the circumference of the same
planet, come to think of it.)  Our ancestors got away with it on the
rational grounds that it was the best clock they had.  We don't have
that excuse.





More information about the Squeak-dev mailing list