Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"You can represent a year using only number" #95

Open
jklausa opened this issue Mar 7, 2024 · 2 comments
Open

"You can represent a year using only number" #95

jklausa opened this issue Mar 7, 2024 · 2 comments

Comments

@jklausa
Copy link

jklausa commented Mar 7, 2024

Japanese calendar requires you to store a year as a (unicode) string.

令和 6 (2024) is not the same as 平成 6 (1994).

@davedelong
Copy link
Owner

I like this and want to include it, but I'd like to figure out a better phrasing. When formatting the dates, the premise of needing more than numbers is correct, but they're both represented in memory using only numbers. Reiwa 6 is { era: 236, year: 6 }, and Heisei 6 is { era: 235, year: 6 } (ie, neither need non-numbers to disambiguate them)

@jklausa
Copy link
Author

jklausa commented Mar 14, 2024

I think it's important to call out both the formatting and storage here. I think you could split it into two fallacies potentially:

— "You can display a year using only numbers", which mentions that you need the kanji to display the era and
— "You can store a year using only a number", which would mention you need to store the era alongside the "year number".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants