3 ms·
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 no
by eloisant 8y ago
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.
- anoncake 8y agoBy 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.
- coldacid 8y agoExcept 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.
- anoncake 8y agoThose kanjis are probably already encoded anyway.