Actions
Bug #9809
closedDate.new(2000,1,1).cweek should == 1
Description
I run Date.new(2000,1,1).cweek
, the result is 52.
My Ruby version is 2.1.1
Actions
Like0
Like0Like0Like0Like0Like0
Added by zfben (Ben Zhu) about 11 years ago. Updated about 11 years ago.
Description
I run Date.new(2000,1,1).cweek
, the result is 52.
My Ruby version is 2.1.1
I see https://bugs.ruby-lang.org/issues/9372
If this is not a bug, please close it, thank you.
This looks like correct behaviour. From a previous issue #9372:
A period of time of seven days within a calendar year, starting on a
Monday and identified by its ordinal number within the year; the first
calendar week of the year is the one that includes the first Thursday
of that year.