Subject: Question: Week Number Semantics

From: "Frank Dawson" <[email-masked]>
Date: Tue, 15 Dec 1998 13:21:08 -0500

Folks:

RFC 2445 references the concept of "Week Number" in the "BYWEEKNO"
recurrence grammar. In addition, ISO 8601 references the concept of "Week
Number". It looks like the views of ISO 8601 are a subset of those in RFC
2445. Does everyone agree with the implications of the extended view taken
by RFC 2445 as it relates to how a CUA should display "Week Number" in a
"Weekly View" UI?

RFC 2445 indicates that:

   The BYWEEKNO rule part specifies a COMMA character (US-ASCII decimal
   44) separated list of ordinals specifying weeks of the year. Valid
   values are 1 to 53 or -53 to -1. This corresponds to weeks according
   to week numbering as defined in [ISO 8601]. A week is defined as a
   seven day period, starting on the day of the week defined to be the
   week start (see WKST). Week number one of the calendar year is the
   first week which contains at least four (4) days in that calendar
   year. This rule part is only valid for YEARLY rules. For example, 3
   represents the third week of the year.

ISO 8601 indicates that:

   3.17  week, calendar: A seven day period within a calendar year,
   starting on a Monday and identified by its ordinal number within
   the year; the first calendar week of the year is the one that
   includes the first Thursday of that year. In the Gregorian
   calendar, this is equivalent to the week which includes 4 January.

Taken together, it appears that ISO 8601 assumes that for the purpose of
calculating the "week number", the week _always_ starts on a Monday. On the
other hand, RFC 2445 clearly allows for a week to start on any day of the
week. Thus, a RFC 2445 "week number" might vary by "start of the week".

The problem that I see is that a CUA's UI may wish to display "Week Number"
in a "Week View" of the calendar. Is "Week Number" a canonical calendar
concept that _always_ must assume Monday as the start of the week? For
example, as is often used across multinational manufacturing corporations or
equivalent "teaming" relationships; where a corporation's factory calendar
is computed, based on weeks of the year. Or is this a calendar concept that
is sensitive to the CUA's local definition of "start of the week" and can
yield different presentations?

It would appear that if CUAs from different vendors are to be iCalendar
"standards" based they should behave the same. Is this right?

If so, then should we view "Week Number" as a non-permutable concept? Or
should the display of "Week Number" vary as the "start of the week" varies?

So end-user feedback on this point would be helpful.

-- Frank Dawson

---

From: Antoine Leca <[email-masked]>
Date: Wed, 30 Dec 1998 12:28:10 +0100

Hi,

Frank Dawson wrote:
> is computed, based on weeks of the year.

Here in France, there comes to an agreement that MOnday is the start of
the week, and to follow the ISO numbering. For example, paper schedules
now often print the Week number in weeks views. And I expect CUAs to
offer the same, of course (and for this reason I dislike American
based products that use a different scheme for numbering).

Since I work in a company where manufacturing is primarly based on week
division, we use very often week numbers; it is common to take an 
appointment for Monday in week 23rd (even beyond the Ocean, but care is
taken when we work with -for us- foreigners).

But before in my life I worked in the IT industry, and I never heard
of week numbers there. And of course, I know that the ISO scheme is
nothing near from universal, and that in particular in the USA another
scheme is mostly used. So for example, I shall not try to take an
appointment based on week numbers with an American.

So my idea is the following: since this idea of week number is used
for specifying an appointment, I think it can be useful to be
presented at CUA level, to *take* appointment, and to display
appointments that use the same convention.

*But*, when the convention differ (the one embeeded in the appointment
vs the user-selected one), I recommend dropping the week numbers
and revert to plain vanilla Gregorian dates.

Equally, if the CUAs do not use the concept of week numbers (or the
user chose to not use it, as I did some years ago), I think the CUA
should also drop the week numbers and revert to "normal" dates.

This will be my expectations.

> Or is this a calendar concept that is sensitive to the CUA's local
> definition of "start of the week" and can yield different presentations?

I shall not recommend such an idea, as it will lead to errors.

> "standards" based they should behave the same. Is this right?

I believe this was the original point of view of ISO8601, and therefore
why they legislated the way they did.
But experience showed that, at least in the USA (and AFAIK), another
scheme(s) kept and keep existing.
Thus, we designed iCalendar to be able to respect all cultures.
I believe this have to be kept this way.

> should the display of "Week Number" vary as the "start of the week" varies?

Bottom line : I think it may vary, but varying will prevent full
interoperability on this particular topic.
Which is IMHO a small lost.

Antoine