Opened 15 years ago
Closed 15 years ago
#1859 closed Bug (Fixed)
Bug in _WeekNumberISO?
| Reported by: | Tweaky | Owned by: | Gary |
|---|---|---|---|
| Milestone: | Component: | Standard UDFs | |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | Cc: |
Description
Hi,
is it possible, that there is a bug in _WeekNumberISO?
When I run this script I get the week of 01.01. for the year
#include <Date.au3>
For $i = 2011 To 2030
$x = _WeekNumberISO($i, 01, 01)
ConsoleWrite($i & @TAB & $x & @CRLF)
Next
The Result is
2011 52
2012 0
2013 1
2014 1
2015 53
2016 52
2017 0
2018 1
2019 1
2020 1
2021 53
2022 52
2023 0
2024 1
2025 1
2026 53
2027 52
2028 52
2029 1
2030 1
It looks like, that the result is 0 when the 01.01 is a sunday.
Attachments (0)
Change History (5)
comment:1 by , 15 years ago
comment:3 by , 15 years ago
? -> question.
Anyway.
There are no zero weeks -> Bug.
Don't know ISO-date specs ... possible the weeks returned on other dates near the year switch might be incorrect to. (seems that way to me.)
The thing that makes me wonder here is the following difference.
Autoit:
@WDAY : Numeric day of week. Range is 1 to 7 which corresponds to Sunday through Saturday.
(starting with Sunday)
http://en.wikipedia.org/wiki/ISO_week_date:
weekday number, a digit d from 1 through 7, beginning with Monday and ending with Sunday.
(starting with Monday)
comment:4 by , 15 years ago
| Component: | AutoIt → Standard UDFs |
|---|---|
| Owner: | set to |
comment:5 by , 15 years ago
| Resolution: | → Fixed |
|---|---|
| Status: | new → closed |

Forum is for questions.