Project

General

Profile

Bug #9809

Date.new(2000,1,1).cweek should == 1

Added by Ben Zhu almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
ruby -v:
2.1.1
[ruby-core:62426]

Description

I run Date.new(2000,1,1).cweek, the result is 52.

My Ruby version is 2.1.1


Related issues

Duplicates Ruby trunk - Bug #9372: Date function cweek reports innaccurately for the date December 30, 2013 Rejected 01/07/2014

History

#1 [ruby-core:62427] Updated by Ben Zhu almost 2 years ago

I see https://bugs.ruby-lang.org/issues/9372

If this is not a bug, please close it, thank you.

#2 [ruby-core:62429] Updated by Andrew Vit almost 2 years ago

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.

#3 [ruby-core:62435] Updated by Yukihiro Matsumoto almost 2 years ago

  • Status changed from Open to Closed

#4 [ruby-core:62436] Updated by Nobuyoshi Nakada almost 2 years ago

  • Duplicates Bug #9372: Date function cweek reports innaccurately for the date December 30, 2013 added

#5 [ruby-core:63505] Updated by Usaku NAKAMURA almost 2 years ago

  • Status changed from Closed to Rejected

Also available in: Atom PDF