The illustro/clock module shows the wrong weeknumber….
How to correct?
It is currently March 28th, 2024, 10:26 pm
wrong weeknumber...?
-
- Posts: 7
- Joined: May 19th, 2017, 11:28 am
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: wrong weeknumber...?
Does that skin show a week number? Where, because I can't find it?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 7
- Joined: May 19th, 2017, 11:28 am
Re: wrong weeknumber...?
Yes it does, after you altered clock.ini....
Code: Select all
[measureTime]
; This measure returns the time in a 24-hour format (i.e. HH:MM).
Measure=Time
Format=%H:%M
; For a 12-hour clock, change the Format option above to: %I:%M %p
; Refer to the Rainmeter manual for other format codes.
[measureDate]
; Returns the date as DD.MM.YYYY
Measure=Time
Format=%d.%m.%Y
[measureDay]
; Returns the current day
Measure=Time
Format=%A
[measureWeek]
; show weeknumber
Measure=Time
Format=%W
-
-
-
[meterWeek]
Meter=String
MeterStyle=styleRightText
MeasureName=measureWeek
X=100
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=%1
Last edited by balala on May 7th, 2019, 8:33 am, edited 1 time in total.
Reason: Please use <code> tags when posting code snippets. It's the </> button.
Reason: Please use <code> tags when posting code snippets. It's the </> button.
-
- Posts: 7
- Joined: May 19th, 2017, 11:28 am
Re: wrong weeknumber...?
Can anyone tell me where the variable %W is calculated?
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: wrong weeknumber...?
Note that %W is not a variable. But what you mean by where is it calculated? The [measureWeek] measure returns the appropriate number.
-
- Rainmeter Sage
- Posts: 2588
- Joined: March 23rd, 2015, 5:26 pm
Re: wrong weeknumber...?
You should read this if you haven't already: https://docs.rainmeter.net/manual/measures/time/. "%W" is a time format string, not a variable.
Regarding your original question about the wrong week, read that "%W" definition carefully. Using "%W", the first week of 2019 didn't start until January 7th, because the 7th was the first Monday of the year. So December 31 2018 through January 6 2019 was the 53rd week of 2018 (or week zero of 2019, I forget which... maybe both). You might consider using "%V" instead of "%W". "%V" uses the ISO 8601 standard, which uses a different method of calculating week numbers. Using "%V", the first week of 2019 was from December 31 to January 6. 2019 is an example of a year in which "%W" and "%V" return completely different values for the entire year.
P.S.: The Rainmeter docs are incorrect for %V, in that there is never a week zero in ISO 8601 standard, weeks always start with week 1.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: wrong weeknumber...?
I fixed that error in the docs months ago.SilverAzide wrote: ↑May 7th, 2019, 11:31 am P.S.: The Rainmeter docs are incorrect for %V, in that there is never a week zero in ISO 8601 standard, weeks always start with week 1.
The C++ routine we use to format time codes are documented here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2017
Or put another way: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 53, and both %g and %G are replaced by the digits of the preceding year.
Week 19 is from Monday May 6, 2019 until (and including) Sunday May 12, 2019. Week number according to the ISO-8601 standard, weeks starting on Monday. The first week of the year is the week that contains that year's first Thursday (='First 4-day week'). The highest week number in a year is either 52 or 53.
-
- Posts: 7
- Joined: May 19th, 2017, 11:28 am
Re: wrong weeknumber...?
I understand what you are saying but still it shows the wrong weeknumber... at this moment week 20 and the date is 25-5-2019...
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: wrong weeknumber...?
Which is ok, I think, because week 1 is the first full week, so if you calculate it, this week is indeed the 20th.
-
- Posts: 7
- Joined: May 19th, 2017, 11:28 am
Re: wrong weeknumber...?
@balala .... in your country different calculating? Its a matter of counting....
You do not have the required permissions to view the files attached to this post.