time module: Week of Year is one day too late #23835
Labels
Bug
This tag is applied to issues which reports bugs.
Modules: time
Bugs/features, related to the `time` module.
Unit: vlib
Bugs/feature requests, that are related to the vlib.
Describe the bug
Hi guys,
Maybe I found an error in the
time
module: The calculation of the "Week of Year" seems to be one day too late.The 10th calendar week starts next Monday, 2025-03-03. Yet,
ww
for that date still shows week "09".The 10th week falsely starts on Tuesday, 2025-03-04.
Date calculation is a "horrible" topic. So please bear with me if I have made a mistake ;-)
Reproduction Steps
Expected Behavior
ww
should be "10" for both dates in the script.Current Behavior
The first date (2025-03-03) prints
09
forww
.Possible Solution
No response
Additional Information/Context
Shell programs handle this correctly. So I guess it's a V issue.
V version
0.4.9 f83af8a
Environment details (OS name and version, etc.)
Chimera Linux
Linux 6.12.16-0-generic
Wayland
(also tested on Void Linux)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: