Template:Current Kanshi
丙午
| This template uses Lua: |
{{CHINESECALENDAR}}, {{JAPANESECALENDAR}} and {{KOREANCALENDAR}} give the date in various traditional East Asian calendars. The year, month and day can be given as parameters, but if not, they will default to the current date in UTC. It uses several different templates and algorithms. Some of these were translated from the Japanese wiki and the Simple English wiki, and others are taken from Calendrical Calculations by Nachum Dershowitz and Edward Reingold. The {{ctime}} templates were also used as a source for the pinyin month and year names.
Usage
- Syntax
{{JAPANESECALENDAR|format=format|show_kanshi=true|show_sekki=true|year|month|day}}{{CHINESECALENDAR|format=format|show_ganzhi=true|show_jieqi=true|year|month|day}}{{KOREANCALENDAR|format=format|show_ganji=true|show_jeolgi=true|year|month|day}}
- JAPANESECALENDAR examples
{{JAPANESECALENDAR}}→ Reiwa 8, Hazuki 14{{JAPANESECALENDAR|format=DMY}}→ 14 Hazuki, Reiwa 8{{JAPANESECALENDAR|format=MDY}}→ Hazuki 14, Reiwa 8{{JAPANESECALENDAR|1945|11|12}}→ Shōwa 20, Kannazuki 8{{JAPANESECALENDAR|show_kanshi=true}}↓{{JAPANESECALENDAR|show_sekki=true}}↓{{JAPANESECALENDAR|format=DMY|show_kanshi=true|show_sekki=true|1945|11|12}}↓- Yin Wood Rooster・Roof Mansion
8 Kannazuki, Shōwa 20
(Rittō, 11 days until Shōsetsu)
- Yin Wood Rooster・Roof Mansion
- CHINESECALENDAR examples
{{CHINESECALENDAR}}→ Fire Horse Year, Month 8, Day 14{{CHINESECALENDAR|format=DMY}}→ Day 14, Month 8, Fire Horse Year{{CHINESECALENDAR|format=MDY}}→ 8, Day 14, Fire Horse Year{{CHINESECALENDAR|1945|11|12}}→ Wood Rooster Year, Month 10, Day 8{{CHINESECALENDAR|show_ganzhi=true}}↓- Yin Metal Ox・Dipper Mansion
Fire Horse Year, Month 8, Day 14
- Yin Metal Ox・Dipper Mansion
{{CHINESECALENDAR|show_jieqi=true}}↓- Fire Horse Year, Month 8, Day 14
(Qiufen, 14 days until Hanlu)
- Fire Horse Year, Month 8, Day 14
{{CHINESECALENDAR|format=DMY|show_ganzhi=true|show_jieqi=true|1945|11|12}}↓- Yin Wood Rooster・Roof Mansion
Day 8, Month 10, Wood Rooster Year
(Lidong, 10 days until Xiaoxue)
- Yin Wood Rooster・Roof Mansion
- KOREANCALENDAR examples
{{KOREANCALENDAR}}→ 14 Dakdal, 4359 DE{{KOREANCALENDAR|format=DMY}}→ 14 Dakdal, 4359 DE{{KOREANCALENDAR|format=MDY}}→ Dakdal 14, 4359 DE{{KOREANCALENDAR|1945|11|12}}→ 8 Dwaejidal, 4278 DE{{KOREANCALENDAR|show_ganji=true}}↓- Yin Metal Ox・Dipper Mansion
14 Dakdal, 4359 DE
- Yin Metal Ox・Dipper Mansion
{{KOREANCALENDAR|show_jeolgi=true}}↓{{KOREANCALENDAR|format=DMY|show_ganji=true|show_jeolgi=true|1945|11|12}}↓- Yin Wood Rooster・Roof Mansion
8 Dwaejidal, 4278 DE
(Ipdong, 10 days until Soseol)
- Yin Wood Rooster・Roof Mansion
Gengō (元号)
For the current Japanese era name and year number, these templates use Module:Japanese calendar. If the emperor changes and the module becomes out of date, please add the new era and the end year of the old era to Module:Japanese calendar/data. Both CURRENTGENGONAME and CURRENTGENGOYEAR can take an optional year parameter, for example:
{{CURRENTGENGONAME|2026}}→ Reiwa{{CURRENTGENGOYEAR|2026}}→ 8
Gānzhī/Kanshi/Ganji (干支)
This template returns the current day or year in the sexagenary cycle. It can also take optional year, month and day parameters. Note that the years change on the Gregorian New Year, not the Chinese New Year. The output is in Chinese/Japanese characters by default, but lang=en could be passed to make it English, and lang=zh-Latn could be passed to make it pinyin. The abbr parameter is ignored unless lang=en is passed, and the month and day parameters are ignored unless type=day is passed.
- Syntax
{{Current Kanshi|type=day|lang=language|abbr=true|year|month|day}}
- Examples
{{Current Kanshi}}→ 丙午{{Current Kanshi|lang=en}}→ Yang Fire Horse{{Current Kanshi|lang=zh-Latn}}→ Bǐngwǔ{{Current Kanshi|lang=en|abbr=true}}→ Fire Horse{{Current Kanshi|type=day}}→ 辛丑{{Current Kanshi|type=day|lang=en}}→ Yin Metal Ox{{Current Kanshi|type=day|lang=zh-Latn}}→ Xīnchǒu{{Current Kanshi|type=day|lang=en|abbr=true}}→ Metal Ox{{Current Kanshi|type=day|1945|11|12}}→ 乙酉{{Current Kanshi|2026}}→ 丙午
Kyūreki (旧暦)
- Template:Current Kyureki (provisional)
- Template:Current Kyureki (provisional)/Day
- Template:Current Kyureki (provisional)/Month
The kyūreki is a lunisolar calendar that was officially used in Japan until its official adoption of the Gregorian calendar in 1873. These templates use Module:Calendrical Calculations to calculate the current date in the kyūreki, specifically the Tenpō calendar instituted in 1844. The traditional names of the months are used, although they are obsolete in modern Japanese.
- Syntax
{{Current Kyureki (provisional)|format=format|year|month|day}}
Nónglì (舊曆/农历)
- Template:Current Nongli
- Template:Current Nongli/Day
- Template:Current Nongli/Month
- Template:Current Nongli/Year
These templates use Module:Calendrical Calculations to calculate the current date in the Chinese calendar, specifically the Chongzhen calendar instituted in 1645.
{{Current Nongli}}→ Fire Horse Year, Month 8, Day 14{{Current Nongli|format=DMY}}→ Day 14, Month 8, Fire Horse Year{{Current Nongli|format=MDY}}→ 8, Day 14, Fire Horse Year{{Current Nongli|format=YMD}}→ Fire Horse Year, Month 8, Day 14{{Current Nongli|format=DM}}→ Day 14, Month 8{{Current Nongli|format=MD}}→ Month 8, Day 14{{Current Nongli|1945|11|12}}→ Wood Rooster Year, Month 10, Day 8{{Current Nongli|format=YMD|1945|11|12}}→ Wood Rooster Year, Month 10, Day 8
Eumnyeok (음력)
- Template:Current Eumnyeok
- Template:Current Eumnyeok/Day
- Template:Current Eumnyeok/Month
- Template:Current Eumnyeok/Year
These templates use Module:Calendrical Calculations to calculate the current date in the Korean calendar, specifically the Dangun calendar which was South Korea's official calendar from 1948 to 1961. Like with the Japanese calendar, the traditional names of the months are used despite being obsolete in modern Korean.
{{Current Eumnyeok}}→ 14 Dakdal, 4359 DE{{Current Eumnyeok|format=DMY}}→ 14 Dakdal, 4359 DE{{Current Eumnyeok|format=MDY}}→ Dakdal 14, 4359 DE{{Current Eumnyeok|format=YMD}}→ 4359 DE Dakdal 14{{Current Eumnyeok|format=DM}}→ 14 Dakdal{{Current Eumnyeok|format=MD}}→ Dakdal 14{{Current Eumnyeok|1945|11|12}}→ 8 Dwaejidal, 4278 DE{{Current Eumnyeok|format=YMD|1945|11|12}}→ 4278 DE Dwaejidal 8
Jiéqì/Sekki/Jeolgi (節気)
The 24 solar terms are 24 divisions of the solar year in the Chinese and Japanese calendars. The Current Sekki template uses Module:Calendrical Calculations to output them. By default, it will output them in Chinese/Japanese characters. To output them in pinyin, pass lang=zh-Latn. To output them in romanised Japanese or Korean, pass lang=ja-Latn or lang=ko-Latn.
By default, Beijing is used as the point of observation (what this means is further explained below). To use Tokyo or Seoul as the point of observation, pass the parameter city=Tokyo or city=Seoul.
- Syntax
{{Current Sekki|lang=language|city=point of observation|year|month|day}}
- Examples
{{Current Sekki}}→ 秋分, 14 days until 寒露{{Current Sekki|lang=zh-Latn}}→ Qiufen, 14 days until Hanlu{{Current Sekki|lang=ja-Latn|city=Tokyo}}→ Shūbun, 14 days until Kanro{{Current Sekki|lang=ko-Latn|city=Seoul}}→ Chubun, 14 days until Hallo{{Current Sekki|lang=ja-Latn|city=Tokyo|1945|11|12}}→ Rittō, 11 days until Shōsetsu
Notes
Module:Calendrical Calculations automatically calculates new moons and solar longitudes, both of which are necessary for the Chinese and Japanese calendars. For Template:Current Kyureki (provisional), the point of observation is set to Tokyo, and the time zone is set to Tokyo's mean solar time for dates until 1887, and to Japan Standard Time from 1888 onwards. For Template:Current Nongli, the point of observation is set to Beijing, and the time zone is set to Beijing's mean solar time until 1928, and to China Standard Time from 1929 onwards. For Template:Current Eumnyeok, the point of observation is Seoul, and the timezone is Seoul's mean solar time until 1908, and +8:30 or +9:00 afterwards depending on the date. This is to follow the source, Calendrical Calculations, which reflects the time zones historically used in Japan, Korea and China. Setting the city parameter on Template:Current Sekki similarly changes the point of observation and the time zone based on the city and time.
The point of observation does not affect the time of day when the calendar will change. By default, it will always change at midnight in UTC to the eqivalent Chinese/Japanese/Korean calendar date. However, the point of observation can still change the numbers shown. If the Sun's solar longitude crosses a multiple of 15° during the 1-hour window between midnight in Tokyo and midnight in Beijing, the Japanese calendar's solar term will begin one day later than the Chinese calendar's, and Template:Current Sekki would show different numbers for them. Similarly, if a new moon occurs in Japan less than one hour after midnight (which, in China, would be less than one hour before midnight), the Chinese and Japanese calendars would be different by one day. This quirk of East Asian lunisolar calendars is further explained here and here.
It should also be noted that the Japanese calendar technically has more rules than are implemented here. As the National Astronomical Observatory of Japan states here, the leap months must be placed so that the winter solstice occurs in the 11th month, the vernal equinox in the second month, the summer solstice in the 5th month, and the autumnal equinox in the 8th month. Only the first of these rules is implemented. This is both to follow the source, and because, as the same article goes on to explain, it is impossible to apply all four rules for some years (like 2033).
Similarly, there are rules unique to the Korean calendar which are not implemented in this template. In particular, page 91 of Ho-min Sohn's Korean Language in Culture and Society states that leap months cannot be inserted after the first, eleventh or twelfth months. However, this rule is not implemented here, which may cause Template:Current Eumnyeok to be inaccurate on some dates.
Regarding the "2033 Kyūreki problem", in which it is unclear whether the Kyūreki's leap month in 2033 should be the seventh or the eleventh month, the algorithm here will make it the eleventh month.
Source
- Dershowitz, Nachum; Reingold, Edward M. (2018). Calendrical Calculations: The Ultimate Edition (Fourth ed.). Cambridge: Cambridge University Press. ISBN 978-1107057623.