[haiku] Re: US Week Numbers

  • From: Izomiac <haikulist@xxxxxxxxxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 17 Oct 2009 23:49:52 -0400

OK, I figure a picture should help explain the problem with US week


Basically, ISO stipulates that weeks go from Monday to Sunday, so it can't
be directly used if weeks don't start on Monday.  For weeks that start on
Sunday (US weeks) I have several options:  "Pseudo ISO" (use the ISO week
number of the Monday of that week), First full week (more common US
standard), Jan 1st is week one (less common US standard), or a few others.
These systems also differ about what to do with week 53, but that's a less
serious concern.

Using the various systems, October 17th is either week 41, 42, or 43.  I
plan to assume ISO weeks if the week starts on a Monday and "yet another"
system if it starts on a Saturday, but what system(s) would be preferred for
weeks starting on a Sunday?  Is there any demand for me to add options for
the other numbering systems?

"Pseudo ISO" seems most consistent with the suggestions thus far.

On Sat, Oct 17, 2009 at 9:13 PM, scott mc <scottmc2@xxxxxxxxx> wrote:

> On Sat, Oct 17, 2009 at 4:58 PM, Izomiac <haikulist@xxxxxxxxxxxxxxxx>
> wrote:
> > I'm debating about using the locale kit.  I'll definitely look into it,
> and
> > probably use it since it's a better solution, but I don't want to break
> BeOS
> > compatibility without a good reason.  For now, I'm mostly just writing
> out
> > month names to minimize date formatting issues, and giving options as to
> > which day to start the week.
> >
> > The issue I'm dealing with is that there are six ways
> > (<http://en.wikipedia.org/wiki/Week_number#Week_number>) to number
> weeks.  I
> > could provide options for every possible standard, but that makes things
> > complicated for anyone unfamiliar with the different standards.
> >
> > For example, today (Sat, Oct. 17th) we're in the 42nd week by the
> European
> > system, but the 41st by the most common system used in the US.  So would
> it
> > be preferable to label this week as the 41st for US calendars, or fudge
> the
> > ISO definition a bit and label it as the 42nd?  I think most calendar
> > programs do the latter so everyone is using the same week number for
> > business days.
> >
> > On Sat, Oct 17, 2009 at 7:27 AM, PulkoMandy <pulkomandy@xxxxxxxxx>
> wrote:
> >>
> >> Le Sat, 17 Oct 2009 10:18:31 +0200, Morten Fjeldstad
> >> <morten.fjeldstad@xxxxxxxxx> a écrit:
> >>
> >>> For my usage, both private and at work, week numbers are essential.
> >>> Outlook's Calendar Options might give you some inspiration if you have
> it
> >>> available.
> >>>
> >>> As for the format of the date (if understood the question correctly)
> >>> shouldn't that follow the locale setting (eventually)? Until then you
> >>> could
> >>> have a box where users can override the date format by specifying a
> >>> formatting string like: DD-MMM-YY.
> >>
> >> The Locale Kit seems a perfect match for what you are trying to do... If
> >> you miss some API in it we will probably want to add it...
> >>
> >> --
> >> Adrien.
> >>
> >
> >
> It would probably be safest to default to the ISO8601 week, which
> defines week one as being the first week containing a Thursday.  Which
> means you could calculate the week number by counting the number of
> Thurdays.
> -scottmc

Other related posts: