week starts at Sunday or Monday??
cbugel at netvision.net.il
Wed Oct 4 19:48:16 UTC 2000
> Numbering days of weeks is part of code, but what is the "right" day 1 is certainly
> getting a bit of topic. I personally expect any code that defines the days of the
> week to define symbolic constants, so that I can use CALENDAR_MONDAY, or Calendar::MONDAY
> or Calendar.MONDAY etc. depending on the language. Just working with numbers
> is a sure formula for error.
I was very amused to see how this thread was taking off :)
Thanks for all the replies!
For the time being I had used the suggested ISO standard, where 1=monday,
but I might as well provide flexibility, and let the user choose, or use
the scheme suggested above.
(I hope my employer will let me put this little datetime class library
on the web, as 'public domain'. not that it is much - it is just a
wrapper, without any logic of it's own, but I have seen that the C library
leaves so much room for the average programmer including myself to make a
mess of the timezones and especially the Daylight Saving Time issues, that
I tried to redefine the user interface of it all).
BTW, does anybody know how environment strings such as
TZ=EST+05EDT,M04.01.00/00:02:00,M09.03.05/00:02:00 work on windows?
I tested them on Linux, and they work fine. I think they are posix (man
tzset describes them), but I am not sure if they work on windows. (I sure
hope they do..)
More information about the tz