Hacker News new | past | comments | ask | show | jobs | submit login

Maybe era kanjis should be encoded in a systematic manner similar to flags. The EU flag is encoded as <Flag letter E><Flag letter U>, the new era would be encoded like <JP era number 2><JP era number 0><JP era number 1><JP era number 9>.



Your proposal does not handle the edge case of an emperor dying in the year of his ascension.


Easily solved by adding another digit after the year. That leaves the edge case of Japan having more than 10 emperors in a year, but thats unlikely.


Or they could just have era1=Meiji, era2=Taisho, era3=Showa, era4=Heisei etc. since Japan only had 4 eras named that way so far (and past era are pretty much not changing).

Then era1-era0 for the 10th era. Much simpler than building from the Gregorian year.


By building from the Gregorian year, you can convert the Japanese year to the Gregorian one without needing updates when a new era begins. I dont know how useful that is in practice though.

Otherwise you can just reserve a range of codepoints for era names.


Except that Japanese eras actually go back to approximately 645 AD, and some emperors reigned through multiple eras and others shared eras (Emperor Meiji himself began his rule in Keio year 3, and it wasn't until Keio year 4 that that era ended and the Meiji era began). Your scheme only works for modern eras rather than the full span of them.


Those kanjis are probably already encoded anyway.


It's not even edge case. 2019 is Heisei 31st until April 30, and whatever the new era will be from May 1.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: