Hello Luuk, in your mentionend man page, there is a similar sentence which is also wrong and needs to be corrected:
"When three of fewer days of the first calendar week of the new year fall within that year, then the ISO 8601 week-based system counts those days as part of week 53 of the preceding year." A unit test should verify that ISO week for 2012-01-01 is 52 (not 53) and ISO year is 2011. Nice to play with: https://www.timeanddate.com/date/weeknumber.html Bye. -----Original Message----- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Luuk Sent: Thursday, May 9, 2019 7:57 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] feature request -- enhance strftime() implementing %V, %g and %G for week of year according to ISO 8601 On 9-5-2019 18:20, Nißl Reinhard wrote: > Hi, > > it would be nice, if sqlite3's strftime() would support the following > formatting codes: > %g The last 2 digits of the ISO 8601 week-based year as a decimal number > (00 - 99) > %G The ISO 8601 week-based year as a decimal number > %V ISO 8601 week number as a decimal number (00 - 53) minimum value for %V is 01. > > The ISO 8601 week and week-based year produced by %V, %g, and %G, uses a week > that begins on Monday, where week 1 is the week that contains January 4th, > which is the first week that includes at least four days of the year. If the > first Monday of the year is the 2nd, 3rd, or 4th, the preceding days are part > of the last week of the preceding year. For those days, %V is replaced by the > last week of the preceding year, and both %g and %G are replaced by the > digits of the preceding year. > > The above text has originally been taken from this documentation and > corrected regarding "%V is replaced by 53": > https://docs.microsoft.com/de-de/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019 better docs: http://man7.org/linux/man-pages/man3/strftime.3.html ;-) > > Thanks. > > Bye. > -- > Reinhard Nißl > reinhard.ni...@fee.de > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users