Package: mhc / 1.2.1-2

030_reiwa.patch Patch series | download
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Subject: Support Japan's new era 令和 (Reiwa) and new holidays
Author: KOIE Hidetaka <hide@koie.org>
Bug: https://github.com/yoshinari-nomura/mhc/pull/49
Bug: https://github.com/yoshinari-nomura/mhc/pull/50
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=928305

diff --git a/emacs/mhc-calendar.el b/emacs/mhc-calendar.el
index d403ec3..5c0635c 100644
--- a/emacs/mhc-calendar.el
+++ b/emacs/mhc-calendar.el
@@ -1071,11 +1071,13 @@ The keys that are defined for mhc-calendar-mode are:
   (format "%4d" yy))
 
 (defun mhc-calendar/inserter-nengo ()
-  (if (> yy 1987)
-      (format "平成%2d年" (- yy 1988))
-    (if (> yy 1924)
-        (format "昭和%2d年" (- yy 1925))
-      "昔々")))
+  (if (or (> yy 2019) (and (= yy 2019) (> mm 4)))
+      (format "令和%2d年" (- yy 2018))
+    (if (> yy 1987)
+        (format "平成%2d年" (- yy 1988))
+      (if (> yy 1924)
+          (format "昭和%2d年" (- yy 1925))
+        "昔々"))))
 
 (defun mhc-calendar/inserter-mm ()
   (format "%d" mm))
diff --git a/samples/japanese-holidays.mhcc b/samples/japanese-holidays.mhcc
index b1083c0..93409df 100644
--- a/samples/japanese-holidays.mhcc
+++ b/samples/japanese-holidays.mhcc
@@ -72,12 +72,14 @@ X-SC-Record-Id: 5E03776A-4280-4337-85C0-F1322A3AAE6E
 
 X-SC-Subject: 海の日
 X-SC-Category: Holiday Japanese
+X-SC-Day: !20200720
 X-SC-Cond: 3rd Mon Jul
 X-SC-Duration: 20030701-
 X-SC-Record-Id: BD4156C2-5546-4146-8297-09CF4210A346
 
 X-SC-Subject: 山の日
 X-SC-Category: Holiday Japanese
+X-SC-Day: !20200811
 X-SC-Cond: 11 Aug
 X-SC-Duration: 20160811-
 X-SC-Record-Id: FC7C481B-7BF5-4639-B700-3B60CB99E05D
@@ -103,9 +105,16 @@ X-SC-Record-Id: AFABC42C-2E9D-4093-A4AF-DA12D4D4B9D7
 X-SC-Subject: 体育の日
 X-SC-Category: Holiday Japanese
 X-SC-Cond: 2nd Mon Oct
-X-SC-Duration: 20001009-
+X-SC-Duration: 20001009-20191231
 X-SC-Record-Id: C17D9CA5-28AF-4826-AD33-8B75473E5B52
 
+X-SC-Subject: スポーツの日
+X-SC-Category: Holiday Japanese
+X-SC-Day: !20201012
+X-SC-Cond: 2nd Mon Oct
+X-SC-Duration: 20200101-
+X-SC-Record-Id: F10B2B18-B0FB-477E-A7D3-A067B31F4736
+
 X-SC-Subject: 文化の日
 X-SC-Category: Holiday Japanese
 X-SC-Cond: 3 Nov
@@ -121,9 +130,15 @@ X-SC-Record-Id: 97E6F125-2625-44A9-8D43-A6FCA9670D8D
 X-SC-Subject: 天皇誕生日
 X-SC-Category: Holiday Japanese
 X-SC-Cond: 23 Dec
-X-SC-Duration: 19891223-
+X-SC-Duration: 19891223-20190430
 X-SC-Record-Id: 51D42B0D-EF46-4D65-B62A-6ED2F0D1F0B5
 
+X-SC-Subject: 天皇誕生日
+X-SC-Category: Holiday Japanese
+X-SC-Cond: 23 Feb
+X-SC-Duration: 20190501-
+X-SC-Record-Id: 59B83B1E-6161-45F5-9DEC-95E3C1CCA4EE
+
 ## 毎年変わる祝日と振替休日
 
 X-SC-Subject: 即位の日
@@ -131,6 +146,26 @@ X-SC-Day: 20190501
 X-SC-Category: Holiday Japanese
 X-SC-Record-Id: 25C73788-1104-42BE-85F6-570861B0020B
 
+X-SC-Subject: 即位礼正殿の儀
+X-SC-Category: Holiday Japanese
+X-SC-Day: 20191022
+X-SC-Record-Id: 76F9756D-C00F-47D0-9592-67E21909C39D
+
+X-SC-Subject: 海の日
+X-SC-Category: Holiday Japanese
+X-SC-Day: 20200723
+X-SC-Record-Id: B9B9AC80-9424-496D-933D-CFF9876ECA5A
+
+X-SC-Subject: スポーツの日
+X-SC-Category: Holiday Japanese
+X-SC-Day: 20200724
+X-SC-Record-Id: AA0F053E-6DD0-4207-A1D0-196567FD94D6
+
+X-SC-Subject: 山の日
+X-SC-Category: Holiday Japanese
+X-SC-Day: 20200810
+X-SC-Record-Id: 87152AA3-7AEE-4689-835F-B19399E694DE
+
 X-SC-Subject: 春分の日
 X-SC-Day: 19960320 19970320 19980321 19990321 20000320 20010320 20020321
   20030321 20040320 20050320 20060321 20070321 20080320 20090320
@@ -163,14 +198,14 @@ X-SC-Day: 19730430 19730924 19740506 19740916 19741104 19751124
   20050321 20060102 20070212 20070430 20070924 20071224 20080506
   20081124 20090506 20100322 20120102 20120430 20121224 20130506
   20131104 20140506 20141124 20150506 20160321 20170102 20180212
-  20180430 20180924 20181224 20190506 20190812 20191104 20200506
-  20230102 20240212 20240506 20240812 20240923 20241104 20250506
+  20180430 20180924 20181224 20190506 20190812 20191104 20200224 20200506
+  20230102 20240212 20240506 20240812 20240923 20241104 20250224 20250506
   20251124 20260506 20270322 20290212 20290430 20290924 20291224
-  20300506 20300812 20301104 20310506 20311124 20330321 20340102
+  20300506 20300812 20301104 20310224 20310506 20311124 20330321 20340102
   20350212 20350430 20350924 20351224 20360506 20361124 20370506
-  20400102 20400430 20401224 20410506 20410812 20411104 20420506
+  20400102 20400430 20401224 20410506 20410812 20411104 20420224 20420506
   20421124 20430506 20440321 20450102 20460212 20460430 20460924
-  20461224 20470506 20470812 20471104 20480506 20500321
+  20461224 20470506 20470812 20471104 20480224 20480506 20500321
 X-SC-Category: Holiday Japanese
 X-SC-Record-Id: E2D696DF-EB49-44D7-B06C-812B10BD99A2