Project

General

Profile

Actions

Bug #9809

closed

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

Bug #9809: Date.new(2000,1,1).cweek should == 1

Added by zfben (Ben Zhu) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
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 1 (0 open1 closed)

Is duplicate of Ruby - Bug #9372: Date function cweek reports innaccurately for the date December 30, 2013Rejectedtadf (tadayoshi funaba)Actions

Updated by zfben (Ben Zhu) over 11 years ago Actions #1 [ruby-core:62427]

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

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

Updated by avit (Andrew Vit) over 11 years ago Actions #2 [ruby-core:62429]

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.

Updated by matz (Yukihiro Matsumoto) over 11 years ago Actions #3 [ruby-core:62435]

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) over 11 years ago Actions #4 [ruby-core:62436]

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

Updated by usa (Usaku NAKAMURA) over 11 years ago Actions #5 [ruby-core:63505]

  • Status changed from Closed to Rejected
Actions

Also available in: PDF Atom