-
Notifications
You must be signed in to change notification settings - Fork 45
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
reign names calculator off by one year #2080
Comments
Hi! Thanks for reporting this. I had a quick look into it and I think the issue is more complicated than that. Our era data says 安政 started in 1855: 10ten-ja-reader/src/content/years.ts Line 313 in f105dd9
Which, strictly speaking it did:
As I understand it, before about 1873 when the Japanese calendar 旧暦 was aligned with the Gregorian calendar, Western years and Japanese years didn't strictly line up. So 安政 started in January 1855 in the Gregorian calendar but 安政2年 is also (mostly) 1855. Then there's the phenomenon where a new era is retroactively applied back to the start of the year which I guess would mean it started in 1854 in some sense. I think handling this properly would be quite a bit more work but would probably be worthwhile to do. |
旧暦 is a deep rabbit hole down to abyss.
I suggest we first clarify to what degree do we want to rectify this problem - do we want to give the correct Gregorian year for each and every 旧暦 day? Or just give 2 probable years to every 旧暦 year?
|
I'm thinking the minimum would be two probable years (e.g. 安政2年 = 1855~1856, maybe even with the dates). If we actually had a full date 安政2年1月16日 then it would be nice if we could actually translate that to a specific year, but I don't think that's strictly necessary. |
Here is a very good and detailed explanation for an accurate date conversion. I would be willing to give this a try, including converting all dates prior to 1873 to their corresponding Gregorian equivalents. |
I kinda agree with the idea that day-to-day conversion is unnecessary (remember that Gregorian calendar starts from the 1580s, which is another deeeeeeeeep rabbit hole).
I was kinda thinking about something like "安政2 = 1855.2.x - 1856.1.x", because I do agree with the point that 安政1 = 1854 is a little (if not extremely) confusing.
From the viewpoint of modern China (which still uses traditional calendar along with Gregorian), we will use the term "celebrate the new year" exclusively for the lunar new year, the term "last year" to refer to either the last Gregorian year or the last lunar year. When we say "last year is 2023", we were actually referring to something like "2023.1.22-2024.2.9 is 2023". But all of that happens in the Chinese context - when any part of this conversation happens in English, it suddenly becomes very confusing.
|
That will always be a problem, though, even when just displaying the time span of one year. Using proleptic Gregorian dates for all dates would be the simplest solution for that. I've started working on this branch, and I've already implemented a way to display the time span as you suggested: With the dataset I gathered, converting every date to a Gregorian date will also be very straightforward. |
It looks really great! I have two suggestions tho:
1. How about making the day and month part smaller font size than the year part, or have dimmer color? I'm not sure about this, just an 思い付き.
2. When displaying full date, PLEASE DO allow custom format or use the format from system or browser locale. PLEASE NEVER hardcode dMy.
Thanks,
|
That's a great idea. I haven't really thought about the design yet, as I wanted to implement the logic first. The day-to-day conversion should be styled differently as well, I think.
It's currently using the |
Since most modern software conflates the concepts of „UI language“ and „locale“, |
Thanks looks great. I agree that doing a suitable localized date is tricky (for some users it might even end up being identical to the original date!) but I wonder if we could just always use YYYY.MM.DD? I think that's unambiguous and since we want to emphasize the year, putting it first makes the information easier to scan—particularly if we end up making the month and date smaller as @SaltfishAmi suggested. |
How about using YYYY年MM月DD日? |
Yes, I think that would work too. (I find it a little harder to scan but at least it's unambiguous. Presumably anyone looking up years would know enough kanji to decipher that much, and if not, they can hover over the individual kanji anyway.) |
Looks great to me! |
Hovering over 安政二年, for example, gives "1856," but it should be "1855." It seems to be adding one extra year to the results (presumably adding 2 to the first year of the reign period; but only 1 should be added, since counting begins at 1, not 0). The same problem occurs for many, but not all, other reign periods.
The text was updated successfully, but these errors were encountered: