From: RRRoy BBBean Date: 2019-04-01T21:51:33-05:00 Subject: [ruby-core:92098] Re: [Ruby trunk Misc#15742] Add Date#jisx0301 support new Japanese era Can this be handled like thread exceptions? Thread.abort_on_exception=true I like this approach because it's dynamic and changes the behavior for the current runtime. Date.japanese_era_exception=true Or perhaps something like Firefox about:config Runtime.thread.abort_on_exception = true Runtime.date.japanese.era_exception = true On 4/1/19 1:31 AM, nobu@ruby-lang.org wrote: > Issue #15742 has been updated by nobu (Nobuyoshi Nakada). > > > Considering Heisei is just 30years, omission of era can cause deadly confusions now and coming decades. > I think it should be an error, rather than assuming the latest era. > > ---------------------------------------- > Misc #15742: Add Date#jisx0301 support new Japanese era > https://bugs.ruby-lang.org/issues/15742#change-77413 > > * Author: kaishuu0123 (Koki Oyatsu) > * Status: Feedback > * Priority: Normal > * Assignee: > ---------------------------------------- > ## 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". > > > Unsubscribe: