From: "duerst (Martin Dürst)" Date: 2014-01-07T14:05:06+09:00 Subject: [ruby-core:59618] [ruby-trunk - Bug #9372] Date function cweek reports innaccurately for the date December 30, 2013 Issue #9372 has been updated by duerst (Martin D��rst). tadf (tadayoshi funaba) wrote: > 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. In the Gregorian calendar, this is equivalent to the > week which includes 4 January. This may not yet be completely clear, because it says "within a [calendar] year" twice. The following quote, from http://en.wikipedia.org/wiki/ISO_week_date, is even clearer: "ISO week-numbering years have a year numbering which is approximately the same as the Gregorian years, but not exactly since an ISO week-numbering year (also called ISO year or week year informally) has 52 or 53 full weeks. That is 364 or 371 days instead of the usual 365 or 366 days." It may be a good idea to add the following example (borrowed from cwyear) Date.new(2000,1,1).cweek #=> 53, see Date#cwyear Tadayoshi, I can do that if you are okay. ---------------------------------------- Bug #9372: Date function cweek reports innaccurately for the date December 30, 2013 https://bugs.ruby-lang.org/issues/9372#change-44148 Author: pblesi (Patrick Blesi) Status: Rejected Priority: Normal Assignee: tadf (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. -- http://bugs.ruby-lang.org/