[haiku] Re: US Week Numbers

  • From: scott mc <scottmc2@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 17 Oct 2009 18:13:47 -0700

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: