Modify

#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 mvg, on Jan 15, 2011 at 8:20:54 AM

Forum is for questions.

comment:2 by Tweaky, on Jan 15, 2011 at 10:10:49 AM

This is not a question.
I think this is a bug in the function.

comment:3 by mvg, on Jan 16, 2011 at 2:20:30 PM

? -> 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 Jon, on May 23, 2011 at 8:56:34 PM

Component: AutoItStandard UDFs
Owner: set to Gary

comment:5 by Jpm, on Jun 1, 2011 at 8:55:18 PM

Resolution: Fixed
Status: newclosed

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.