[ruby-core:92074] [Ruby trunk Misc#15742] Add Date#jisx0301 support new Japanese era

From: duerst@...
Date: 2019-04-01 04:38:34 UTC
List: ruby-core #92074
Issue #15742 has been updated by duerst (Martin Dst).


kaishuu0123 (Koki Oyatsu) wrote:

> * 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".

I'm also not 100% sure the new letter will be "R", but given that all major Romanization methods
(https://en.wikipedia.org/wiki/Hepburn_romanization, https://en.wikipedia.org/wiki/Kunrei-shiki_romanization, and https://en.wikipedia.org/wiki/Nihon-shiki_romanization) use 'R' and not 'L', and "ei" and "wa" are already established from Heisei and Showa, I'd bet quite a bit that it's Reiwa and 'R', and not something else.

----------------------------------------
Misc #15742: Add Date#jisx0301 support new Japanese era
https://bugs.ruby-lang.org/issues/15742#change-77403

* 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".



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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next