> Le 2 mai 2019 à 22:01, Thomas Kurz <sqlite.2...@t-net.ruhr> a écrit :
> 
> I think "week of the month" is not a standard value. As with week of the 
> year, is week #1 the week in which the month starts, the first complete week 
> within the month, or the first week with at least 4 days?

These are very regional matters around our living globe.
In most European locations where ISO-8601 applies for that matter, a week 
starts on Monday and ends on Sunday (not Sunday to Saturday) and the week #1 of 
a year is the one week whose Thursday falls in that year (and the Monday can be 
in the previous year). This can lead to years sometimes with 53 weeks instead 
of 52.

Some past examples:

Monday 31 December 2007 until Sunday 6 January 2008  == Week 01/2008
Monday 28 December 2009 until Sunday 3 January 2010  == Week 53/2009
Monday 04 January 2010  until Sunday 10 January 2010 == Week 01/2010

I'm not implying whatever SQLite does through its date manipulation features 
should be done any differently. I'm just adding facts to the discussion (and 
I'm late reading the list these days). I'm used to never rely on any component 
way of computing dates but to rely on application logic, specific to the user's 
location.

Applying ISO-8601 way of thinking, the first week of a month could be the first 
one whose Thursday falls in that month.  But I don't remember to ever had to 
compute a week # of the month. People generally only rely on week # of the year 
when stating, for instance, "expect delivery within week #13".

—  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit besten 
Grüßen,
Olivier Mascia
https://www.integral.be


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to