-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalendar-holidays.txt
86 lines (61 loc) · 3.28 KB
/
calendar-holidays.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
calendar/*-holidays.json
~~~~~~~~~~~~~~~~~~~~~~~~
These files contain list of national holidays.
* Files
<https://raw.githubusercontent.com/manakai/data-locale/master/data/calendar/jp-holidays.json>
Holidays of Japan.
<https://raw.githubusercontent.com/manakai/data-locale/master/data/calendar/jp-flagdays.json>
Flag days of Japan.
<https://raw.githubusercontent.com/manakai/data-locale/master/data/calendar/ryukyu-holidays.json>
Holidays of Ryukyu Islands (1945-06 -- 1952-02-09 (Tokara) /
1953-12-24 (Amami) / 1972-05-14 (Okinawa)).
* Structure of |data/*-holidays.json|
Those files contain list of official holidays in the region.
A JSON file contains a JSON object whose names are days in YYYY-MM-DD
format (in Gregorian calendar) and values are names of holidays in
(one of) the primary language for the region.
Although files might contain future holidays, holidays can be added,
removed, or moved at any time by relevant laws.
The |data/jp-holidays.json| file also contains "一六日", government
holidays of 1868-01-21 -- 1876-03-31 (which were replaced by Sunday
after 1876-04-01). Strictly, they are not holidays.
* Structure of |data/*-flagdays.json|
Those files contain list of days relevant flag icons should be shown
in calendars. For |data/jp-flagdays.json|, the Hinomaru (Japan's
flag) icon (🇯🇵 = U+1F1EF U+1F1F5) should be shown with the name of the
holiday (as in |data/jp-holidays.json|) in celendars.
A JSON file contains a JSON object whose names are days in YYYY-MM-DD
format (in Gregorian calendar) and values are [boolean] true values.
Although files might contain future holidays, holidays can be added,
removed, or moved at any time by relevant laws.
* Algorithm
The color of day /day/ in Japan is defined as follows:
1. If /day/ is contained in the |data/calendar/jp-holidays.json|
data file, return red.
2. Otherwise, /day/ is Sunday and /day/ >= 1876-04-01, return red.
3. Otherwise, /day/ is Saturday and /day/ >= 1876-04-01, return blue.
4. Otherwise, return black.
* Sources
** 日本
- 国民の祝日に関する法律 (昭和23年法律178号)
- <https://ja.wikipedia.org/wiki/%E7%A5%9D%E7%A5%AD%E6%97%A5>
- <https://ja.wikipedia.org/wiki/%E5%9B%BD%E6%B0%91%E3%81%AE%E7%A5%9D%E6%97%A5>
- <https://ja.wikipedia.org/wiki/%E5%9B%BD%E6%B0%91%E3%81%AE%E4%BC%91%E6%97%A5>
- <http://homepage1.nifty.com/gyouseinet/kyujitsu.htm>
- <https://wiki.suikawiki.org/n/%E6%97%A5%E6%9C%AC%E3%81%AE%E7%A5%9D%E6%97%A5$1095>
- <https://wiki.suikawiki.org/n/%E6%97%A5%E3%81%AE%E4%B8%B8#section-%E7%A5%9D%E6%97%A5%E3%81%AE%E5%9B%BD%E6%97%97%E6%8E%B2%E6%8F%9A>
** 琉球
- 住民の祝祭日に関する立法 (1961年立法第85号)
- <https://ja.wikipedia.org/wiki/%E4%BD%8F%E6%B0%91%E3%81%AE%E7%A5%9D%E7%A5%AD%E6%97%A5>
** 春分, 秋分
- <http://www.nao.ac.jp/faq/a0301.html>
- <http://www.asahi-net.or.jp/~ci5m-nmr/misc/equinox.html>
- <https://ja.wikipedia.org/wiki/%E6%98%A5%E5%88%86>
- <https://ja.wikipedia.org/wiki/%E7%A7%8B%E5%88%86>
* License
You are granted a license to use, reproduce and create derivative
works of these files.
Per CC0 <https://creativecommons.org/publicdomain/zero/1.0/>, to the
extent possible under law, the author of the JSON file and this
document has waived all copyright and related or neighboring rights to
the JSON file and this document.