-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add locale for ja-JP #16
Comments
I would like to help 😃 I will collect the source and so on later, but I have some questions and comments:
Isn't this
Some holidays had moved temporally, 天皇誕生日 (Emperor's Birthday) is the reigning Emperor's birthday so it has moved from time to time, and so on. Are they representable?
Most of them are "the second Monday in January" or such. 春分の日 and 秋分の日 are tricky, as it is not the easter but depend on the equinox in March and September.
Schools, companies, and so on would have non-working days on the nearest non-holiday if they fall on a Sunday. However, the date of holidays on the calendar will not move. Does it count as a substitute holiday?
Can a holiday be both N and R? Otherwise, N is defined as non-R holidays? |
Yes, you are correct, I fixed the error in the description. 👍🏻
Yes, of course – if you can provide the translation.
Holidata provides data from 2011, so we only need to consider the emperors' birthdays since then. If this should change, Holidata needs to reflect this of course. There are several ways to do this: either implement a function for each emperor which provides the holiday for the given time range (open ended for the current one) or implement a single function which provides the holiday at the respective date for the given year. I would opt for the one-emperor-one-function approach, as it provides a clearer encapsulation of the specific holiday.
If there is an algorithm to calculate the date of the equinox (just like the easter algorithm) then we can use this one. Otherwise, the equinoxes/dates have to be defined somewhere beforehand, so we have to implement (and regularly update) this table then.
For most countries Holidata implements them as
Note: The opposite of both flags is simply to leave them out. A non-national holiday however must have regions specified (a national holiday, on the other hand, must have no regions specified). The purpose 'religious' flag is not quite defined. Currently it is used to mark holidays with a religious background. |
Thank you for answering! I think I got enough information to collect data, but I may ask again if not.
Thanks!
OK, I would.
I see.
A table would be better, as they are officially declared in February of the previous year based on astronomical observation. You can calculate estimated equinoxes in Japan, however.
OK.
Yes, I meant that equinoxes are national holidays defined by law but on the other hand, religious festivals occur on these holidays. Thus, I wonder if religious events are not counted as national events. |
Some updates: The table of holidays in CSV by the Cabinet Office of Japan is available at: https://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv (Note that the encoding is not UTF-8 but Shift_JIS.) The canonical source of holidays is 国民の祝日に関する法律. As far as I know, translations of this act are not provided officially. |
The following locale needs to be verified/completed:
Checklist:
<month>-<day>
correct?N
= national holiday, defined by law,R
= holiday with religious background,F
= holiday with fixed date,V
= holiday with variable date)The text was updated successfully, but these errors were encountered: