From: matthew@... Date: 2014-07-19T08:26:36+00:00 Subject: [ruby-core:63864] [ruby-trunk - Bug #10049] RDoc bug for time format Issue #10049 has been updated by Matthew Kerwin. Tsuyoshi Sawada wrote: > > However, the documentation for Time.strptime says, simply: > > > > %Y :: Year with century > > I don't understand how you interpreted the phrase "with century". In order to express a year with century, there has to be the third digit (hundreds), which means there has to be at least three digits. The documentation still does not match the Ruby behavior. No, it doesn't mean that there must be a third digit, it means that the century is always explicit, never implied. This includes absence. For example, the value `"93"` means unambiguously *A.D. 93*, never *1993* (or any other year). In contrast, according to its documentation `strftime` would produce `"0093"` -- which it does. ---------------------------------------- Bug #10049: RDoc bug for time format https://bugs.ruby-lang.org/issues/10049#change-47889 * Author: Tsuyoshi Sawada * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: 2.1.1 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- A bug report https://bugs.ruby-lang.org/issues/8941 notes a contradiction between RDoc and Ruby behavior. If tadayoshi funaba is correct and `%Y` should be able to accept digits less than four, then the following RDoc description is a bug, and should be corrected. %Y - Year with century (can be negative, 4 digits at least) -- https://bugs.ruby-lang.org/