It is currently April 19th, 2019, 7:23 pm

Documentation for Time measure

Discussion about the documentation, main Rainmeter site and forums.
User avatar
qwerky
Posts: 180
Joined: April 10th, 2014, 12:31 am
Location: Canada

Documentation for Time measure

qwerky » March 21st, 2019, 6:57 pm

The list of Format Codes in the documentation for Time Measure, lists:
%w: Weekday as number with Sunday as first day of week. (0 - 6), and
%u: ISO 8601 weekday as number with Monday as first day of week. (1 - 7).
'w' for Sunday; 'u' for Monday.

But it also lists:
%U: Week of year number, with the first Sunday as first day of week one. (00 - 53), and
%W: Week of year as number, with first Monday as first day of week one. (00 - 53).
'U' for Sunday; 'W' for Monday.

Perhaps this is intentional? Or perhaps an error, as logically one would expect the designator for week-number based on a specific weekday, to match the designator for that weekday, differing in case only; rather than alternating; i.e. wouldn't it make more sense to use 'W' for week-number/Sunday-origin, to match 'w' for weekday/Sunday-origin?

In addition, I note that today, both return "11", while the ISO week number as reported by Wikipedia is "12", as also returned by the Time Measure's 'V' format code. I'm curious as to the discrepancy. Yes, 'V' is origin "1", while 'W' and 'U' are origin "0", but both extend to "53", i.e. 'U' and 'W' allow for one more week than does 'V'.
User avatar
jsmorley
Developer
Posts: 19178
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Documentation for Time measure

jsmorley » March 21st, 2019, 9:01 pm

User avatar
qwerky
Posts: 180
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Documentation for Time measure

qwerky » March 21st, 2019, 9:21 pm

:D So it's hard to tell where it began! :rofl:

Though it's not the fault of Rainmeter, I still find it hard to understand why some allow for 54 weeks in a year (By what definition could that even be possible?), and extremely confusing as to when the week begins. The Wikipedia page linked above seems to indicate that the week begins on Thursday! :?
User avatar
jsmorley
Developer
Posts: 19178
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Documentation for Time measure

jsmorley » March 21st, 2019, 9:28 pm

I think you would have to arrange a séance, and ask Dennis Ritchie.

https://en.wikipedia.org/wiki/Dennis_Ritchie

Or travel to Princeton, and ask Brian Kernighan...

https://en.wikipedia.org/wiki/Brian_Kernighan

In other words, I don't know. Some of the Time stuff is so arcane that only Dr. Who has any idea what it is on about.
User avatar
qwerky
Posts: 180
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Documentation for Time measure

qwerky » March 21st, 2019, 10:34 pm

:D A couple of my favorite authors. I still have two copies of "The C Programming Language" on my shelf.