[ruby-core:62429] [ruby-trunk - Bug #9809] Date.new(2000, 1, 1).cweek should == 1

From: andrew@...
Date: 2014-05-06 17:21:24 UTC
List: ruby-core #62429
Issue #9809 has been updated by Andrew Vit.


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.

----------------------------------------
Bug #9809: Date.new(2000,1,1).cweek should == 1
https://bugs.ruby-lang.org/issues/9809#change-46577

* Author: Ben Zhu
* Status: Open
* Priority: Normal
* Assignee: 
* Category: core
* Target version: 
* ruby -v: 2.1.1
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I run `Date.new(2000,1,1).cweek`, the result is 52.

My Ruby version is 2.1.1



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next