[ruby-core:64795] [ruby-trunk - Bug #9372] Date function cweek reports innaccurately for the date December 30, 2013

From: esaari@...
Date: 2014-09-05 15:54:10 UTC
List: ruby-core #64795
Issue #9372 has been updated by Eric Saari.


Nobuyoshi Nakada wrote:
> This is a repeated question, so it feels nice to add examples.

Even though this is a closed issue, I am seeing the same issue for the years 2018 and 2019:

`[1] pry(#<Object>)> date = Date.new(2018,12,31)
=> #<Date: 2018-12-31 ((2458484j,0s,0n),+0s,2299161j)>
[2] pry(#<Object>)> date.cweek
=> 1
[3] pry(#<Object>)> date = Date.new(2019,12,31)
=> #<Date: 2019-12-31 ((2458849j,0s,0n),+0s,2299161j)>
[4] pry(#<Object>)> date.cweek
=> 1`

Can this same issue apply for two calendar years in a row?

----------------------------------------
Bug #9372: Date function cweek reports innaccurately for the date December 30, 2013
https://bugs.ruby-lang.org/issues/9372#change-48683

* Author: Patrick Blesi
* Status: Rejected
* Priority: Normal
* Assignee: tadayoshi funaba
* Category: 
* Target version: 
* ruby -v: 2.0.0p247
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Date function cweek reports innaccurately for the date December 30, 2013.  The current week is reported as 1 instead of 53.



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

In This Thread

Prev Next