Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
661 lines (437 sloc) 20.7 KB
data/calendar/era-defs.json
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The file contains various properties of eras.
* Data types
The following data types are used in this document:
year
An AD year <https://manakai.github.io/spec-datetime/#ad-year>.
day
A day, represnted by a JSON object with following name/value pairs,
which all represent the same day:
gregorian
The Gregorian date string
<https://manakai.github.io/spec-datetime/#gregorian-date-string>
of the day.
gregorian_era
The Gregorian era date string
<https://manakai.github.io/spec-datetime/#gregorian-era-date-string>
of the day with /era/.
jd
The JD day number
<https://manakai.github.io/spec-datetime/#jd-day-number> of the
day.
julian
The Julian date string
<https://manakai.github.io/spec-datetime/#julian-date-string> of
the day.
julian_era
The Julian era date string
<https://manakai.github.io/spec-datetime/#julian-era-date-string>
of the day with /era/.
kyuureki
The kyuureki date string
<https://manakai.github.io/spec-datetime/#kyuureki-date-string>
of the day.
kyuureki_era
The kyuureki era date string
<https://manakai.github.io/spec-datetime/#kyuureki-era-date-string>
of the day with /era/.
* Structure
The file contains a JSON object with following name/value pairs:
current_jp [string]
The key of the current era used in Japan.
eras [object]
Names are era keys as used in these data files and values are
their descriptions, represented as JSON objects with following
name/value pairs:
abbr [string?]
The abbreviation of the era name, using the "native" script,
if any. Similar to |code7|.
abbr_latn [string?]
The abbreviation of the era name, using Latin letters, if any.
Similar to |code2|.
cn_ryuukyuu_era [boolean]
Whether the era is a Chinese era used in Okinawa (Ryuukyuu)
area of Japan.
code1 [integer?]
code2 [string?]
code4 [integer?]
code5 [integer?]
code6 [integer?]
code7 [string?]
code9 [integer?]
code16 [string?]
code17 [integer?]
code18 [integer?]
code19 [integer?]
code20 [integer?]
The era codes #1, #2, #4, #5, #6, #7, #9, #16, #17, #18, #19,
or #20 codes [CODES] for the era, respectively, if any.
code10 [integer?]
The type of the era in CLDR, if any. The era codes #10
[CODES].
code11 [integer?]
code12 [integer?]
The glyph number of the glyph for the character for the era in
the Adobe-Japan1, in horizontal or vertical form, if any,
respectively. The era codes #11 and #12 [CODES].
code13 [integer?]
The bit combination of the character for the era, if any, in
Shift JIS. The era codes #13 [CODES].
code14 [integer?]
The serial number of the era in the 日本年号史大事典, if any.
The era codes #14 [CODES].
code15 [string?]
The serial number of the era in the 日本年号大観, if any. The
era codes #15 [CODES].
en_desc [string?]
The official English short description of the era, if any.
ends [events]
The end days of the era.
id [integer]
The ID, which is a positive integer, uniquely assigned to the
era. Era codes #8 [CODES].
ja_readings [array?]
Japanese readings of the era, if known [JAREADINGS}. The
value is a JSON array of the objects representing different
readings, with following name/value pairs:
kana [string]
The primary Hiragana representation of the reading. Same
as |kana_modern|, if any, or |kana_classic|, or the first
item of |kana_others|, if any.
kana_classic [string?]
The Hiragana representation of the reading, in the most
popular 歴史的仮名遣い spelling, if known.
kana_modern [string?]
The Hiragana representation of the reading, in the 現代仮
名遣い (Modern Kana Spelling) spelling, if known.
kana_others [array?]
A JSON array of the other known Hiragana representations
of the readings, i.e. 歴史的仮名遣い spelling variations,
if any.
latin [string?]
The primary Latin representation (Roma-ji transliteration)
of the reading. The commonly used Roma-ji representation,
if any, or |latin_macron|, if any.
latin_macron [string?]
The Hepburn Romanization of the reading, using letters
with macrons, if |kana_modern| is known.
latin_normal [string?]
The Hepburn Romanization of the reading, transliterating
|kana_modern| as is, if any.
latin_others [array?]
A JSON array of the other commonly used Latin
representations of the readings, if any.
For these fields, a U+0020 SPACE character is inserted at
Kanji boundaries in Hiragana representations unless they are
native Japanese words. The first letters in the Latin
representations are uppercased and the other letters are
lowercased. The characters |-| and |'| are used as Roma-ji
punctuations.
jp_emperor_era [boolean]
Whether the era is used to represent years where no 元号 was
officially defined and used in Japan. Note that not all eras
with Japanese Emperor's name have |jp_emperor_era| flag.
jp_era [boolean]
Whether the era is an official 元号 used in Japan but does not
have |jp_north_era| or |jp_south_era| flag.
jp_north_era [boolean]
Whether the era is an official 元号 which was used by Japan's
北朝 government (at least partially). Note that some of eras
also have the |jp_south_era| flag (but have different start or
end day). Eras with |jp_north_era| flag are not marked as
|jp_era|.
jp_private_era [boolean]
Whether the era is an unofficial 元号 (i.e. a 元号 that is not
known to be defined by any central government) used in Japan.
jp_south_era [boolean]
Whether the era is an official 元号 which was used by Japan's
南朝 government (at least partially). Note that some of eras
also have the |jp_north_era| flag (but have different start or
end day). Eras with |jp_north_era| flag are not marked as
|jp_era|.
key [string]
The key used to identify the era in these data files. It is
unique within the eras described in this file. It might or
might not be equal to the |name| of the era.
known_oldest_year [year?]
The earliest year the era is used, if known.
known_latest_year [year?]
The last year the era is used, if known.
name [string]
A name of the era, which can be used as a default prefix of a
year using the era in the official modern spelling of the
country where the era is (or was) used, wherever possible.
names [object]
Known variants of the era name. Names are variants and values
are [boolean] true values. Variants include names without
suffix (e.g. "神武" for "神武天皇") and names using different
spelling (e.g. using traditional variant such as "神武" and "神
武天皇"). They also include any |name|, |name_cn|, |name_ja|,
|name_ko|, |name_tw|, |short_name|, |abbr|, and |abbr_latn| of
the era. (The |key| might not be a name.)
name_cn [string?]
The name of the era in Simplified Chinese, if known.
name_kana [string?]
The primary Japanese reading of the era, in Hiragana (without
spaces), if known. [JAREADINGS]
name_kanas [object?]
Known Japanese readings of the era, in Hiragana modern,
classic, and other spellings. Names are variants and values
are [boolean] true values. [JAREADINGS]
name_ko [string?]
The name of the era in Korean with Hangul, if known.
name_latn [string?]
The primary Latin name of the era, if known. For Japanese
eras, the modern common Roma-ji transliteration of the
|name_kana|, using same rules as in |ja_readings|.
[JAREADINGS]
name_tw [string?]
The name of the era in Traditional Chinese as written in
Taiwan, if known.
name_vi [string?]
The name of the era in Vietnamese, if known.
offset [integer?]
The offset of the first year from the year AD1, if known. The
number of the year in the era can be obtained by subtracting
the |offset| from the AD year
<https://manakai.github.io/spec-datetime/#ad-year>. Note that
the offset can be negative.
short_name [string]
A shorter name of the era, omitting common suffixes (e.g. "神武"
for name "神武天皇"), if any, or same value as |name|.
sources
A JSON array of the authoritative or definitive sources of the
era, if known. The items of the array represent the sources,
as JSON objects with following name/value pairs:
title [string?]
The title of the source document. Note that it might or
might not be the official title (There might not be any
official title of the document).
url [string]
The URL of the source document.
starts [events]
The start days of the era.
suikawiki [string?]
The name of the SuikaWiki article on the era, if any. It can
be converted to a URL by percent-encoding and then appending
to <https://wiki.suikawiki.org/n/>.
unicode [string?]
The Unicode character for the era, if any. Era codes #3
[CODES].
wref_en [string?]
A Wikipedia reference
<https://github.com/geocol/data-jp-transport/blob/master/doc/datatypes.txt>
for the English Wikipedia article on the era, if known.
wref_ja [string?]
A Wikipedia reference
<https://github.com/geocol/data-jp-transport/blob/master/doc/datatypes.txt>
for the Japanese Wikipedia article on the era, if known.
wref_ko [string?]
A Wikipedia reference
<https://github.com/geocol/data-jp-transport/blob/master/doc/datatypes.txt>
for the Korean Wikipedia article on the era, if known.
wref_zh [string?]
A Wikipedia reference
<https://github.com/geocol/data-jp-transport/blob/master/doc/datatypes.txt>
for the Chinese Wikipedia article on the era, if known.
start_day [day?]
start_year [year?]
end_day [day?]
end_year [year?]
official_start_day [day?]
actual_end_day [day?]
north_start_day [day?]
north_start_year [year?]
north_official_start_day [day?]
north_actual_end_day [day?]
north_end_day [day?]
north_end_year [year?]
south_start_day [day?]
south_start_year [year?]
south_end_day [day?]
south_end_year [year?]
south_official_start_day [day?]
south_actual_end_day [day?]
The start and end of the era, if defined and known.
The start or end of the era can be defined in terms of day or
year.
If the start or end is defined in terms of day, |start_day| or
|end_day| is set to the value which should be used when a date
represented in other format is converted into the era-based
format (according to the era system "jp" for |jp_era| eras).
If the start is defined in terms of day and there is an
"official" start day, |official_start_day| is set to that day.
It can be different from the |start_day| if the era was
defined after its actual start day. See also
<https://wiki.suikawiki.org/n/%E5%85%83%E5%8F%B7#anchor-159>.
If the end is defined in terms of day, |actual_end_day| is set
to that day. It can be different from the |end_day| if a new
era had been started before the end of the |actual_end_day|.
For eras with |jp_north_era| or |jp_south_era| flag, |north_|
or |south_| prefixed name/value pairs are used instead, as
their values can be different for 北朝 and 南朝. Note that 正
平の一統 is not reflected to these properties. The
|jp_north_era| flag is not set to the 正平 era.
If the start or end is defined in terms of day, |start_year|
or |end_year| is set to the year of the |start_day| or the
|actual_end_day| in the "native" calendar.
If the start or end is defined in terms of year, |start_year|
or |end_year| is set to that year.
If start or end is defined in terms of year, |start_*_day| and
|end_*_day| name/value pairs, where * is |gregorian|,
|julian|, or |kyuureki|, are set to the first or last days in
those calendars.
For values with type [day], the parameter /era/ is set to the
era.
Note that there is a special era: "unknown", which indicates that
the era is unknown or not specified.
name_conflicts
List of eras which share same name but have different definitions.
This is a JSON object whose names are conflicting era names and
whose values are their descriptions, as JSON objects whose names
are relevant era keys and values are [boolean] true values.
name_to_key
Mappings from era names to era keys. This is a JSON object whose
names are strings identifying the mapping and values are their
descriptions, as JSON objects whose names are era names and values
are corresponding era keys.
The mapping "jp" is a mapping which should be appropriate for most
Japanese contexts. Now that Japan is the only country using 元号,
this should be the global default used when the no context is
known.
name_to_keys
A mapping table from era names to era keys. Names are era names
(i.e. values in the |era_names| list of eras) and values are JSON
objects whose names are relevant era keys and values are [boolean]
true values.
numbers_in_era_names
List of era names that contain numeric characters, characters
representing ranges in time periods, and delimiter characters
(i.e. characters that can cause problems when a string is to be
parsed into an era name and a year number). A JSON object whose
names are numeric characters and values are list of relevant era
names, represented as JSON objects whose names are era names and
values are JSON objects whose names are relevant era keys and
values are [boolean] true values.
* The |events| data type
If the value's type is |events|, i.e. it is a |starts| or |ends|
fields, its value is a JSON array of relevant events. If there is no
event, the value can be null or omitted.
An event is a JSON object with following name/value pairs:
day
The day. If an exact day is known, a [day] value. Otherwise, a
JSON array of start and end [day] values representing a range.
group [string?]
The group or city the event is relevant, for relevant |type|.
next [string?]
prev [string?]
starts: The |prev| value is the key of the previous era before the
transition represented by the event.
ends: The |next| value is the key of the previous era after the
transition represented by the event.
type [string]
The type of the event.
dayretroactivated
ends: The day before the establishment day of the |next| era.
Same as |end_day|.
decreed
starts: The day the era had been officially enforced in the
government (覆奏).
ends: The day the |next| era was decreed.
diplomatically-notified
starts: The day the era was sent to foreign governments.
established
established/possible
established/incorrect
starts: The day the era has been defined.
ends: The day the |next| era has been defined.
There is at most one |established| event. The "/possible"
events represent other possible days, if the exact day of the
establishment is not recorded. The "/incorrect" events
represent other days that had been considered as the
establishment day but then was known as incorrect.
proclaimed
starts: The day the era had been announced (but not yet used).
received
starts: The day the era had been received by |group|.
ends: The day the |next| era was received.
retroactivated
starts: The first day of the first calendar year of the era,
retroactively considered as the start of the era.
ends: The previous day of the |next| era's retroactivated day.
shogunate-enforced
starts: The day the era had been enforced (吉書始) in the
Shogunate (幕府).
ends: The day the |next| era was shogunate-enforced.
succeed
starts: The day of the succeed of the |prev| era.
ends: The day of the succession of the Emperor.
wartime
starts: The day the era was changed as part of irregular
wartime process by |group|.
ends: The day the |next| era was "wartime"-changed.
year-end
ends: The last day of the year the era was exited.
year-start
starts: The first day of the year the era was started.
* Comparison tables
The file |data/calendar/jp-era-start-dates.html| contains a table
comparing start days of Japanese eras from various era definition
tables.
The file |data/calendar/jp-era-year-maps.html| contains a table
comparing year names using Japanese eras from various AD-era mapping
tables.
The file |data/calendar/era-codes.html| contains a table comparing
various era codes. [CODES]
The file |data/calendar/era-yomis.html| contains a table comparing
Japanese era name readings from various sources. [JAREADINGS]
The file |data/calendar/era-kodai-years.html| contains a table
comparing Kodai era year ranges from various sources. [KODAI]
The file |data/calendar/era-kodai-starts.html| contains a table
comparing Kodai era start years from various sources. [KODAI]
* See also
If you are trying to implement AD to 元号 conversions, see also
|doc/calendar-era-systems.txt|.
* Sources
元号一覧 (日本) - Wikipedia
<https://ja.wikipedia.org/wiki/%E5%85%83%E5%8F%B7%E4%B8%80%E8%A6%A7_(%E6%97%A5%E6%9C%AC)>.
天皇の一覧 - Wikipedia
<https://ja.wikipedia.org/wiki/%E5%A4%A9%E7%9A%87%E3%81%AE%E4%B8%80%E8%A6%A7>.
私年号 - Wikipedia
<https://ja.wikipedia.org/wiki/%E7%A7%81%E5%B9%B4%E5%8F%B7>.
九州王朝説 - Wikipedia
<https://ja.wikipedia.org/wiki/%E4%B9%9D%E5%B7%9E%E7%8E%8B%E6%9C%9D%E8%AA%AC>.
SuikaWiki:元号 <https://wiki.suikawiki.org/n/%E5%85%83%E5%8F%B7>.
Template:Japanese era names - Wikipedia, the free encyclopedia
<https://en.wikipedia.org/wiki/Template:Japanese_era_names>.
List of Emperors of Japan - Wikipedia, the free encyclopedia
<https://en.wikipedia.org/wiki/List_of_Emperors_of_Japan>.
年号(元号)の読み方・西暦対照表(音訳の部屋), 2015-11-29 17:43:26 +09:00
<http://hiramatu-hifuka.com/onyak/rekisi/nenngo.html>.
我が国の私年号に関する研究(二) -- 室町時代 --, 久保常晴
<http://repository.ris.ac.jp/dspace/bitstream/11266/2900/1/KJ00000189425.pdf>.
中國年號列表 - 維基百科,自由的百科全書
<https://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9B%BD%E5%B9%B4%E5%8F%B7%E5%88%97%E8%A1%A8>.
台灣年號列表 - 维基百科,自由的百科全书
<https://zh.wikipedia.org/wiki/%E5%8F%B0%E7%81%A3%E5%B9%B4%E8%99%9F%E5%88%97%E8%A1%A8>.
越南年号列表 - 维基百科,自由的百科全书
<https://zh.wikipedia.org/wiki/%E8%B6%8A%E5%8D%97%E5%B9%B4%E5%8F%B7%E5%88%97%E8%A1%A8>.
朝鮮半島年號列表 - 維基百科,自由的百科全書
<https://zh.wikipedia.org/zh-tw/%E6%9C%9D%E9%AE%AE%E5%8D%8A%E5%B3%B6%E5%B9%B4%E8%99%9F%E5%88%97%E8%A1%A8>.
[CODES] SuikaWiki:元号コード
<https://wiki.suikawiki.org/n/%E5%85%83%E5%8F%B7%E3%82%B3%E3%83%BC%E3%83%89>.
日本年号史大事典, 所功, et al, 2017-01.
CLDR - Unicode Common Locale Data Repository,
<https://cldr.unicode.org/>.
[JAREADINGS] SuikaWiki:元号の読み方
<https://wiki.suikawiki.org/n/%E5%85%83%E5%8F%B7%E3%81%AE%E8%AA%AD%E3%81%BF%E6%96%B9>.
[KODAI] SuikaWiki:古代年号
<https://wiki.suikawiki.org/n/%E5%8F%A4%E4%BB%A3%E5%B9%B4%E5%8F%B7>.
* 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 files and this
document has waived all copyright and related or neighboring rights to
the JSON files and this document.
You can’t perform that action at this time.