From: nobu@... Date: 2019-04-01T10:33:32+00:00 Subject: [ruby-core:92090] [Ruby trunk Feature#15742] Add Date#jisx0301 support new Japanese era Issue #15742 has been updated by nobu (Nobuyoshi Nakada). Tracker changed from Misc to Feature nobu (Nobuyoshi Nakada) wrote: > kaishuu0123 (Koki Oyatsu) wrote: > > I was surprised that handled the omission of era in `Date#jisx0301`. > > More surprisingly, it is required by JIS X 0301; its definition is basically non-era, and the era *may* be preceded. > > ������������������������������������������������������������������������������������������������ > > If necessary, the year display may be preceded by a symbol identifying the era. Note: JIS X 0301 states the era symbol is optional, but doesn't mention the default era in the case it is omitted. At the best, it will be defined by the application(s), I guess, like announcers in ISO/IEC 2022. ---------------------------------------- Feature #15742: Add Date#jisx0301 support new Japanese era https://bugs.ruby-lang.org/issues/15742#change-77419 * Author: kaishuu0123 (Koki Oyatsu) * Status: Feedback * Priority: Normal * Assignee: * Target version: ---------------------------------------- ## Reproduce process ``` irb(main):002:0> require 'date' => true irb(main):003:0> Date.new(2019, 5, 1).jisx0301 => "H31.05.01" ``` * ruby version: trunk ## Result of reproduce process ``` irb(main):003:0> Date.new(2019, 5, 1).jisx0301 => "H31.05.01" ``` ## Expected result and the reason why you expect ``` irb(main):002:0> require 'date' => true irb(main):003:0> Date.new(2019, 5, 1).jisx0301 => "R01.05.01" ``` ### reason * new era (Reiwa?) starts from 2019/05/01 * refs: https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L7049 * I can't be sure that initial letter is "R". -- https://bugs.ruby-lang.org/ Unsubscribe: