import datetime
import enum


class EraType(enum.Enum):
    GENERAL = 'general'
    DAIKAKUJI = 'daikakuji'
    JIMYOUIN = 'jimyouin'
    COMMON = 'common'


_ERA_DATA_COMMON = [
    ("西暦", "Seireki", datetime.date(1, 1, 1), None, EraType.COMMON),
]

_ERA_DATA_GENERAL = [
    ("大化", "Taika", datetime.date(645, 7, 20), datetime.date(650, 3, 25), EraType.GENERAL),
    ("白雉", "Hakuchi", datetime.date(650, 3, 25), datetime.date(654, 11, 27), EraType.GENERAL),
    (None, None, datetime.date(654, 11, 27), datetime.date(686, 8, 17), EraType.GENERAL),
    ("朱鳥", "Shuchou", datetime.date(686, 8, 17), datetime.date(686, 10, 4), EraType.GENERAL),
    (None, None, datetime.date(686, 10, 4), datetime.date(701, 5, 7), EraType.GENERAL),
    ("大宝", "Taihou", datetime.date(701, 5, 7), datetime.date(704, 6, 20), EraType.GENERAL),
    ("慶雲", "Keiun", datetime.date(704, 6, 20), datetime.date(708, 2, 11), EraType.GENERAL),
    ("和銅", "Wadou", datetime.date(708, 2, 11), datetime.date(715, 10, 7), EraType.GENERAL),
    ("霊亀", "Reiki", datetime.date(715, 10, 7), datetime.date(717, 12, 28), EraType.GENERAL),
    ("養老", "Yourou", datetime.date(717, 12, 28), datetime.date(724, 3, 7), EraType.GENERAL),
    ("神亀", "Jinki", datetime.date(724, 3, 7), datetime.date(729, 9, 6), EraType.GENERAL),
    ("天平", "Tempyou", datetime.date(729, 9, 6), datetime.date(749, 5, 8), EraType.GENERAL),
    ("天平感宝", "TempyouKampou", datetime.date(749, 5, 8), datetime.date(749, 8, 23), EraType.GENERAL),
    ("天平勝宝", "TempyouSyouhou", datetime.date(749, 8, 23), datetime.date(757, 9, 10), EraType.GENERAL),
    ("天平宝字", "TempyouHouji", datetime.date(757, 9, 10), datetime.date(765, 2, 5), EraType.GENERAL),
    ("天平神護", "TempyouJingo", datetime.date(765, 2, 5), datetime.date(767, 9, 17), EraType.GENERAL),
    ("神護景雲", "JingoKeiun", datetime.date(767, 9, 17), datetime.date(770, 10, 27), EraType.GENERAL),
    ("宝亀", "Houki", datetime.date(770, 10, 27), datetime.date(781, 2, 3), EraType.GENERAL),
    ("天応", "Tennou", datetime.date(781, 2, 3), datetime.date(782, 10, 4), EraType.GENERAL),
    ("延暦", "Enryaku", datetime.date(782, 10, 4), datetime.date(806, 6, 12), EraType.GENERAL),
    ("大同", "Daidou", datetime.date(806, 6, 12), datetime.date(810, 10, 24), EraType.GENERAL),
    ("弘仁", "Kounin", datetime.date(810, 10, 24), datetime.date(824, 2, 12), EraType.GENERAL),
    ("天長", "Tenchou", datetime.date(824, 2, 12), datetime.date(834, 2, 18), EraType.GENERAL),
    ("承和", "Jouwa", datetime.date(834, 2, 18), datetime.date(848, 7, 20), EraType.GENERAL),
    ("嘉祥", "Kashou", datetime.date(848, 7, 20), datetime.date(851, 6, 5), EraType.GENERAL),
    ("仁寿", "Ninju", datetime.date(851, 6, 5), datetime.date(854, 12, 27), EraType.GENERAL),
    ("斉衡", "Saikou", datetime.date(854, 12, 27), datetime.date(857, 3, 24), EraType.GENERAL),
    ("天安", "Tennan", datetime.date(857, 3, 24), datetime.date(859, 5, 24), EraType.GENERAL),
    ("貞観", "Jougan", datetime.date(859, 5, 24), datetime.date(877, 6, 5), EraType.GENERAL),
    ("元慶", "Gangyou", datetime.date(877, 6, 5), datetime.date(885, 3, 15), EraType.GENERAL),
    ("仁和", "Ninna", datetime.date(885, 3, 15), datetime.date(889, 6, 3), EraType.GENERAL),
    ("寛平", "Kampyou", datetime.date(889, 6, 3), datetime.date(898, 5, 24), EraType.GENERAL),
    ("昌泰", "Syoutai", datetime.date(898, 5, 24), datetime.date(901, 9, 5), EraType.GENERAL),
    ("延喜", "Engi", datetime.date(901, 9, 5), datetime.date(923, 6, 3), EraType.GENERAL),
    ("延長", "Enchou", datetime.date(923, 6, 3), datetime.date(931, 5, 21), EraType.GENERAL),
    ("承平", "Jouhei", datetime.date(931, 5, 21), datetime.date(938, 6, 27), EraType.GENERAL),
    ("天慶", "Tengyou", datetime.date(938, 6, 27), datetime.date(947, 5, 20), EraType.GENERAL),
    ("天暦", "Tenryaku", datetime.date(947, 5, 20), datetime.date(957, 11, 26), EraType.GENERAL),
    ("天徳", "Tentoku", datetime.date(957, 11, 26), datetime.date(961, 3, 10), EraType.GENERAL),
    ("応和", "Ouwa", datetime.date(961, 3, 10), datetime.date(964, 8, 24), EraType.GENERAL),
    ("康保", "Kouhou", datetime.date(964, 8, 24), datetime.date(968, 9, 13), EraType.GENERAL),
    ("安和", "Anna", datetime.date(968, 9, 13), datetime.date(970, 5, 8), EraType.GENERAL),
    ("天禄", "Tenroku", datetime.date(970, 5, 8), datetime.date(974, 1, 21), EraType.GENERAL),
    ("天延", "Tenen", datetime.date(974, 1, 21), datetime.date(976, 8, 16), EraType.GENERAL),
    ("貞元", "Jougen", datetime.date(976, 8, 16), datetime.date(979, 1, 5), EraType.GENERAL),
    ("天元", "Tengen", datetime.date(979, 1, 5), datetime.date(983, 6, 3), EraType.GENERAL),
    ("永観", "Eikan", datetime.date(983, 6, 3), datetime.date(985, 5, 24), EraType.GENERAL),
    ("寛和", "Kanna", datetime.date(985, 5, 24), datetime.date(987, 5, 10), EraType.GENERAL),
    ("永延", "Eien", datetime.date(987, 5, 10), datetime.date(989, 9, 15), EraType.GENERAL),
    ("永祚", "Eiso", datetime.date(989, 9, 15), datetime.date(990, 12, 1), EraType.GENERAL),
    ("正暦", "Syouryaku", datetime.date(990, 12, 1), datetime.date(995, 3, 30), EraType.GENERAL),
    ("長徳", "Choutoku", datetime.date(995, 3, 30), datetime.date(999, 2, 6), EraType.GENERAL),
    ("長保", "Chouhou", datetime.date(999, 2, 6), datetime.date(1004, 8, 14), EraType.GENERAL),
    ("寛弘", "Kankou", datetime.date(1004, 8, 14), datetime.date(1013, 2, 14), EraType.GENERAL),
    ("長和", "Chouwa", datetime.date(1013, 2, 14), datetime.date(1017, 5, 27), EraType.GENERAL),
    ("寛仁", "Kannin", datetime.date(1017, 5, 27), datetime.date(1021, 3, 23), EraType.GENERAL),
    ("治安", "Jian", datetime.date(1021, 3, 23), datetime.date(1024, 8, 25), EraType.GENERAL),
    ("万寿", "Manju", datetime.date(1024, 8, 25), datetime.date(1028, 8, 24), EraType.GENERAL),
    ("長元", "Chougen", datetime.date(1028, 8, 24), datetime.date(1037, 5, 15), EraType.GENERAL),
    ("長暦", "Chouryaku", datetime.date(1037, 5, 15), datetime.date(1040, 12, 22), EraType.GENERAL),
    ("長久", "Choukyuu", datetime.date(1040, 12, 22), datetime.date(1044, 12, 22), EraType.GENERAL),
    ("寛徳", "Kantoku", datetime.date(1044, 12, 22), datetime.date(1046, 5, 28), EraType.GENERAL),
    ("永承", "Eishou", datetime.date(1046, 5, 28), datetime.date(1053, 2, 8), EraType.GENERAL),
    ("天喜", "Tenki", datetime.date(1053, 2, 8), datetime.date(1058, 9, 25), EraType.GENERAL),
    ("康平", "Kouhei", datetime.date(1058, 9, 25), datetime.date(1065, 9, 10), EraType.GENERAL),
    ("治暦", "Jiryaku", datetime.date(1065, 9, 10), datetime.date(1069, 5, 12), EraType.GENERAL),
    ("延久", "Enkyuu", datetime.date(1069, 5, 12), datetime.date(1074, 9, 22), EraType.GENERAL),
    ("承保", "Jouhou", datetime.date(1074, 9, 22), datetime.date(1077, 12, 11), EraType.GENERAL),
    ("承暦", "Jouryaku", datetime.date(1077, 12, 11), datetime.date(1081, 3, 28), EraType.GENERAL),
    ("永保", "Eihou", datetime.date(1081, 3, 28), datetime.date(1084, 3, 21), EraType.GENERAL),
    ("応徳", "Outoku", datetime.date(1084, 3, 21), datetime.date(1087, 5, 17), EraType.GENERAL),
    ("寛治", "Kanji", datetime.date(1087, 5, 17), datetime.date(1095, 1, 29), EraType.GENERAL),
    ("嘉保", "Kahou", datetime.date(1095, 1, 29), datetime.date(1097, 1, 9), EraType.GENERAL),
    ("永長", "Eichou", datetime.date(1097, 1, 9), datetime.date(1098, 1, 2), EraType.GENERAL),
    ("承徳", "Joutoku", datetime.date(1098, 1, 2), datetime.date(1099, 9, 21), EraType.GENERAL),
    ("康和", "Kouwa", datetime.date(1099, 9, 21), datetime.date(1104, 3, 15), EraType.GENERAL),
    ("長治", "Chouji", datetime.date(1104, 3, 15), datetime.date(1106, 5, 20), EraType.GENERAL),
    ("嘉承", "Kashou", datetime.date(1106, 5, 20), datetime.date(1108, 9, 16), EraType.GENERAL),
    ("天仁", "Tennin", datetime.date(1108, 9, 16), datetime.date(1110, 8, 7), EraType.GENERAL),
    ("天永", "Tennei", datetime.date(1110, 8, 7), datetime.date(1113, 9, 1), EraType.GENERAL),
    ("永久", "Eikyuu", datetime.date(1113, 9, 1), datetime.date(1118, 5, 2), EraType.GENERAL),
    ("元永", "Gennei", datetime.date(1118, 5, 2), datetime.date(1120, 5, 16), EraType.GENERAL),
    ("保安", "Houan", datetime.date(1120, 5, 16), datetime.date(1124, 5, 25), EraType.GENERAL),
    ("天治", "Tenji", datetime.date(1124, 5, 25), datetime.date(1126, 2, 22), EraType.GENERAL),
    ("大治", "Daiji", datetime.date(1126, 2, 22), datetime.date(1131, 3, 7), EraType.GENERAL),
    ("天承", "Tenshou", datetime.date(1131, 3, 7), datetime.date(1132, 9, 28), EraType.GENERAL),
    ("長承", "Choushou", datetime.date(1132, 9, 28), datetime.date(1135, 6, 17), EraType.GENERAL),
    ("保延", "Houen", datetime.date(1135, 6, 17), datetime.date(1141, 8, 20), EraType.GENERAL),
    ("永治", "Eiji", datetime.date(1141, 8, 20), datetime.date(1142, 6, 1), EraType.GENERAL),
    ("康治", "Kouji", datetime.date(1142, 6, 1), datetime.date(1144, 4, 4), EraType.GENERAL),
    ("天養", "Tennyou", datetime.date(1144, 4, 4), datetime.date(1145, 8, 19), EraType.GENERAL),
    ("久安", "Kyuuan", datetime.date(1145, 8, 19), datetime.date(1151, 2, 21), EraType.GENERAL),
    ("仁平", "Ninmpei", datetime.date(1151, 2, 21), datetime.date(1154, 12, 11), EraType.GENERAL),
    ("久寿", "Kyuuju", datetime.date(1154, 12, 11), datetime.date(1156, 5, 25), EraType.GENERAL),
    ("保元", "Hougen", datetime.date(1156, 5, 25), datetime.date(1159, 5, 16), EraType.GENERAL),
    ("平治", "Heiji", datetime.date(1159, 5, 16), datetime.date(1160, 2, 25), EraType.GENERAL),
    ("永暦", "Eiryaku", datetime.date(1160, 2, 25), datetime.date(1161, 10, 1), EraType.GENERAL),
    ("応保", "Ouhou", datetime.date(1161, 10, 1), datetime.date(1163, 5, 11), EraType.GENERAL),
    ("長寛", "Choukan", datetime.date(1163, 5, 11), datetime.date(1165, 7, 21), EraType.GENERAL),
    ("永万", "Eiman", datetime.date(1165, 7, 21), datetime.date(1166, 9, 30), EraType.GENERAL),
    ("仁安", "Ninnan", datetime.date(1166, 9, 30), datetime.date(1169, 5, 13), EraType.GENERAL),
    ("嘉応", "Kaou", datetime.date(1169, 5, 13), datetime.date(1171, 6, 3), EraType.GENERAL),
    ("承安", "Syouan", datetime.date(1171, 6, 3), datetime.date(1175, 8, 23), EraType.GENERAL),
    ("安元", "Angen", datetime.date(1175, 8, 23), datetime.date(1177, 9, 5), EraType.GENERAL),
    ("治承", "Jishou", datetime.date(1177, 9, 5), datetime.date(1181, 9, 1), EraType.GENERAL),
    ("養和", "Youwa", datetime.date(1181, 9, 1), datetime.date(1182, 7, 6), EraType.GENERAL),
    ("寿永", "Juei", datetime.date(1182, 7, 6), datetime.date(1184, 6, 3), EraType.GENERAL),
    ("元暦", "Genryaku", datetime.date(1184, 6, 3), datetime.date(1185, 9, 16), EraType.GENERAL),
    ("文治", "Bunji", datetime.date(1185, 9, 16), datetime.date(1190, 5, 23), EraType.GENERAL),
    ("建久", "Kenkyuu", datetime.date(1190, 5, 23), datetime.date(1199, 5, 30), EraType.GENERAL),
    ("正治", "Syouji", datetime.date(1199, 5, 30), datetime.date(1201, 3, 26), EraType.GENERAL),
    ("建仁", "Kennin", datetime.date(1201, 3, 26), datetime.date(1204, 3, 30), EraType.GENERAL),
    ("元久", "Genkyuu", datetime.date(1204, 3, 30), datetime.date(1206, 6, 12), EraType.GENERAL),
    ("建永", "Kennei", datetime.date(1206, 6, 12), datetime.date(1207, 11, 23), EraType.GENERAL),
    ("承元", "Jougen", datetime.date(1207, 11, 23), datetime.date(1211, 4, 30), EraType.GENERAL),
    ("建暦", "Kenryaku", datetime.date(1211, 4, 30), datetime.date(1214, 1, 25), EraType.GENERAL),
    ("建保", "Kempou", datetime.date(1214, 1, 25), datetime.date(1219, 6, 3), EraType.GENERAL),
    ("承久", "Joukyuu", datetime.date(1219, 6, 3), datetime.date(1222, 6, 1), EraType.GENERAL),
    ("貞応", "Jouou", datetime.date(1222, 6, 1), datetime.date(1225, 1, 7), EraType.GENERAL),
    ("元仁", "Gennin", datetime.date(1225, 1, 7), datetime.date(1225, 6, 4), EraType.GENERAL),
    ("嘉禄", "Karoku", datetime.date(1225, 6, 4), datetime.date(1228, 1, 25), EraType.GENERAL),
    ("安貞", "Antei", datetime.date(1228, 1, 25), datetime.date(1229, 4, 7), EraType.GENERAL),
    ("寛喜", "Kanki", datetime.date(1229, 4, 7), datetime.date(1232, 4, 30), EraType.GENERAL),
    ("貞永", "Jouei", datetime.date(1232, 4, 30), datetime.date(1233, 6, 1), EraType.GENERAL),
    ("天福", "Tempuku", datetime.date(1233, 6, 1), datetime.date(1234, 12, 4), EraType.GENERAL),
    ("文暦", "Bunryaku", datetime.date(1234, 12, 4), datetime.date(1235, 11, 8), EraType.GENERAL),
    ("嘉禎", "Katei", datetime.date(1235, 11, 8), datetime.date(1239, 1, 6), EraType.GENERAL),
    ("暦仁", "Ryakunin", datetime.date(1239, 1, 6), datetime.date(1239, 3, 20), EraType.GENERAL),
    ("延応", "Ennou", datetime.date(1239, 3, 20), datetime.date(1240, 8, 12), EraType.GENERAL),
    ("仁治", "Ninji", datetime.date(1240, 8, 12), datetime.date(1243, 3, 25), EraType.GENERAL),
    ("寛元", "Kangen", datetime.date(1243, 3, 25), datetime.date(1247, 4, 12), EraType.GENERAL),
    ("宝治", "Houji", datetime.date(1247, 4, 12), datetime.date(1249, 5, 9), EraType.GENERAL),
    ("建長", "Kenchou", datetime.date(1249, 5, 9), datetime.date(1256, 10, 31), EraType.GENERAL),
    ("康元", "Kougen", datetime.date(1256, 10, 31), datetime.date(1257, 4, 7), EraType.GENERAL),
    ("正嘉", "Syouka", datetime.date(1257, 4, 7), datetime.date(1259, 4, 27), EraType.GENERAL),
    ("正元", "Syougen", datetime.date(1259, 4, 27), datetime.date(1260, 5, 31), EraType.GENERAL),
    ("文応", "Bunnou", datetime.date(1260, 5, 31), datetime.date(1261, 3, 29), EraType.GENERAL),
    ("弘長", "Kouchou", datetime.date(1261, 3, 29), datetime.date(1264, 4, 3), EraType.GENERAL),
    ("文永", "Bunnei", datetime.date(1264, 4, 3), datetime.date(1275, 5, 29), EraType.GENERAL),
    ("建治", "Kenji", datetime.date(1275, 5, 29), datetime.date(1278, 3, 30), EraType.GENERAL),
    ("弘安", "Kouan", datetime.date(1278, 3, 30), datetime.date(1288, 6, 5), EraType.GENERAL),
    ("正応", "Syouou", datetime.date(1288, 6, 5), datetime.date(1293, 9, 13), EraType.GENERAL),
    ("永仁", "Einin", datetime.date(1293, 9, 13), datetime.date(1299, 6, 1), EraType.GENERAL),
    ("正安", "Syouan", datetime.date(1299, 6, 1), datetime.date(1302, 12, 18), EraType.GENERAL),
    ("乾元", "Kengen", datetime.date(1302, 12, 18), datetime.date(1303, 9, 24), EraType.GENERAL),
    ("嘉元", "Kagen", datetime.date(1303, 9, 24), datetime.date(1307, 1, 26), EraType.GENERAL),
    ("徳治", "Tokuji", datetime.date(1307, 1, 26), datetime.date(1308, 11, 30), EraType.GENERAL),
    ("延慶", "Enkyou", datetime.date(1308, 11, 30), datetime.date(1311, 5, 25), EraType.GENERAL),
    ("応長", "Ouchou", datetime.date(1311, 5, 25), datetime.date(1312, 5, 5), EraType.GENERAL),
    ("正和", "Syouwa", datetime.date(1312, 5, 5), datetime.date(1317, 3, 24), EraType.GENERAL),
    ("文保", "Bumpou", datetime.date(1317, 3, 24), datetime.date(1319, 5, 26), EraType.GENERAL),
    ("元応", "Gennou", datetime.date(1319, 5, 26), datetime.date(1321, 3, 30), EraType.GENERAL),
    ("元亨", "Gennkou", datetime.date(1321, 3, 30), datetime.date(1325, 1, 2), EraType.GENERAL),
    ("正中", "Syouchuu", datetime.date(1325, 1, 2), datetime.date(1326, 6, 5), EraType.GENERAL),
    ("嘉暦", "Karyaku", datetime.date(1326, 6, 5), datetime.date(1329, 9, 30), EraType.GENERAL),
    ("応永", "Ouei", datetime.date(1394, 8, 10), datetime.date(1428, 6, 19), EraType.GENERAL),
    ("正長", "Syouchou", datetime.date(1428, 6, 19), datetime.date(1429, 10, 12), EraType.GENERAL),
    ("永享", "Eikyou", datetime.date(1429, 10, 12), datetime.date(1441, 3, 19), EraType.GENERAL),
    ("嘉吉", "Kakitsu", datetime.date(1441, 3, 19), datetime.date(1444, 3, 3), EraType.GENERAL),
    ("文安", "Bunnann", datetime.date(1444, 3, 3), datetime.date(1449, 8, 25), EraType.GENERAL),
    ("宝徳", "Houtoku", datetime.date(1449, 8, 25), datetime.date(1452, 8, 19), EraType.GENERAL),
    ("享徳", "Kyoutoku", datetime.date(1452, 8, 19), datetime.date(1455, 9, 15), EraType.GENERAL),
    ("康正", "Koushou", datetime.date(1455, 9, 15), datetime.date(1457, 10, 25), EraType.GENERAL),
    ("長禄", "Chouroku", datetime.date(1457, 10, 25), datetime.date(1461, 2, 10), EraType.GENERAL),
    ("寛正", "Kannshou", datetime.date(1461, 2, 10), datetime.date(1466, 3, 23), EraType.GENERAL),
    ("文正", "Bunnshou", datetime.date(1466, 3, 23), datetime.date(1467, 4, 18), EraType.GENERAL),
    ("応仁", "Ouninn", datetime.date(1467, 4, 18), datetime.date(1469, 6, 17), EraType.GENERAL),
    ("文明", "Bunnmei", datetime.date(1469, 6, 17), datetime.date(1487, 8, 18), EraType.GENERAL),
    ("長享", "Choukyou", datetime.date(1487, 8, 18), datetime.date(1489, 9, 25), EraType.GENERAL),
    ("延徳", "Entoku", datetime.date(1489, 9, 25), datetime.date(1492, 8, 21), EraType.GENERAL),
    ("明応", "Meiou", datetime.date(1492, 8, 21), datetime.date(1501, 3, 28), EraType.GENERAL),
    ("文亀", "Bunnki", datetime.date(1501, 3, 28), datetime.date(1504, 3, 26), EraType.GENERAL),
    ("永正", "Eishou", datetime.date(1504, 3, 26), datetime.date(1521, 10, 3), EraType.GENERAL),
    ("大永", "Daiei", datetime.date(1521, 10, 3), datetime.date(1528, 9, 13), EraType.GENERAL),
    ("享禄", "Kyouroku", datetime.date(1528, 9, 13), datetime.date(1532, 9, 8), EraType.GENERAL),
    ("天文", "Tennbunn", datetime.date(1532, 9, 8), datetime.date(1555, 11, 17), EraType.GENERAL),
    ("弘治", "Kouji", datetime.date(1555, 11, 17), datetime.date(1558, 3, 28), EraType.GENERAL),
    ("永禄", "Eiroku", datetime.date(1558, 3, 28), datetime.date(1570, 6, 6), EraType.GENERAL),
    ("元亀", "Gennki", datetime.date(1570, 6, 6), datetime.date(1573, 9, 4), EraType.GENERAL),
    ("天正", "Tennshou", datetime.date(1573, 9, 4), datetime.date(1593, 1, 10), EraType.GENERAL),
    ("文禄", "Bunnroku", datetime.date(1593, 1, 10), datetime.date(1596, 12, 16), EraType.GENERAL),
    ("慶長", "Keichou", datetime.date(1596, 12, 16), datetime.date(1615, 9, 5), EraType.GENERAL),
    ("元和", "Genna", datetime.date(1615, 9, 5), datetime.date(1624, 4, 17), EraType.GENERAL),
    ("寛永", "Kannei", datetime.date(1624, 4, 17), datetime.date(1645, 1, 13), EraType.GENERAL),
    ("正保", "Syouhou", datetime.date(1645, 1, 13), datetime.date(1648, 4, 7), EraType.GENERAL),
    ("慶安", "Keian", datetime.date(1648, 4, 7), datetime.date(1652, 10, 20), EraType.GENERAL),
    ("承応", "Jouou", datetime.date(1652, 10, 20), datetime.date(1655, 5, 18), EraType.GENERAL),
    ("明暦", "Meireki", datetime.date(1655, 5, 18), datetime.date(1658, 8, 21), EraType.GENERAL),
    ("万治", "Manji", datetime.date(1658, 8, 21), datetime.date(1661, 5, 23), EraType.GENERAL),
    ("寛文", "Kannbunn", datetime.date(1661, 5, 23), datetime.date(1673, 10, 30), EraType.GENERAL),
    ("延宝", "Empou", datetime.date(1673, 10, 30), datetime.date(1681, 11, 9), EraType.GENERAL),
    ("天和", "Tenna", datetime.date(1681, 11, 9), datetime.date(1684, 4, 5), EraType.GENERAL),
    ("貞享", "Joukyou", datetime.date(1684, 4, 5), datetime.date(1688, 10, 23), EraType.GENERAL),
    ("元禄", "Genroku", datetime.date(1688, 10, 23), datetime.date(1704, 4, 16), EraType.GENERAL),
    ("宝永", "Houei", datetime.date(1704, 4, 16), datetime.date(1711, 6, 11), EraType.GENERAL),
    ("正徳", "Syoutoku", datetime.date(1711, 6, 11), datetime.date(1716, 8, 9), EraType.GENERAL),
    ("享保", "Kyouhou", datetime.date(1716, 8, 9), datetime.date(1736, 6, 7), EraType.GENERAL),
    ("元文", "Gennbunn", datetime.date(1736, 6, 7), datetime.date(1741, 4, 12), EraType.GENERAL),
    ("寛保", "Kampou", datetime.date(1741, 4, 12), datetime.date(1744, 4, 3), EraType.GENERAL),
    ("延享", "Enkyou", datetime.date(1744, 4, 3), datetime.date(1748, 8, 5), EraType.GENERAL),
    ("寛延", "Kannenn", datetime.date(1748, 8, 5), datetime.date(1751, 12, 14), EraType.GENERAL),
    ("宝暦", "Houreki", datetime.date(1751, 12, 14), datetime.date(1764, 6, 30), EraType.GENERAL),
    ("明和", "Meiwa", datetime.date(1764, 6, 30), datetime.date(1772, 12, 10), EraType.GENERAL),
    ("安永", "Annei", datetime.date(1772, 12, 10), datetime.date(1781, 4, 25), EraType.GENERAL),
    ("天明", "Tennmei", datetime.date(1781, 4, 25), datetime.date(1789, 2, 19), EraType.GENERAL),
    ("寛政", "Kannsei", datetime.date(1789, 2, 19), datetime.date(1801, 3, 19), EraType.GENERAL),
    ("享和", "Kyouwa", datetime.date(1801, 3, 19), datetime.date(1804, 3, 22), EraType.GENERAL),
    ("文化", "Bunnka", datetime.date(1804, 3, 22), datetime.date(1818, 5, 26), EraType.GENERAL),
    ("文政", "Bunnsei", datetime.date(1818, 5, 26), datetime.date(1831, 1, 23), EraType.GENERAL),
    ("天保", "Tenmpou", datetime.date(1831, 1, 23), datetime.date(1845, 1, 9), EraType.GENERAL),
    ("弘化", "Kouka", datetime.date(1845, 1, 9), datetime.date(1848, 4, 1), EraType.GENERAL),
    ("嘉永", "Kaei", datetime.date(1848, 4, 1), datetime.date(1855, 1, 15), EraType.GENERAL),
    ("安政", "Ansei", datetime.date(1855, 1, 15), datetime.date(1860, 4, 8), EraType.GENERAL),
    ("万延", "Mannei", datetime.date(1860, 4, 8), datetime.date(1861, 3, 29), EraType.GENERAL),
    ("文久", "Bunnkyuu", datetime.date(1861, 3, 29), datetime.date(1864, 3, 27), EraType.GENERAL),
    ("元治", "Genji", datetime.date(1864, 3, 27), datetime.date(1865, 5, 1), EraType.GENERAL),
    ("慶応", "Keiou", datetime.date(1865, 5, 1), datetime.date(1868, 10, 23), EraType.GENERAL),
    ("明治", "Meiji", datetime.date(1868, 1, 23), datetime.date(1912, 7, 30), EraType.GENERAL),
    ("大正", "Taishou", datetime.date(1912, 7, 30), datetime.date(1926, 12, 25), EraType.GENERAL),
    ("昭和", "Shouwa", datetime.date(1926, 12, 25), datetime.date(1989, 1, 8), EraType.GENERAL),
    ("平成", "Heisei", datetime.date(1989, 1, 8), datetime.date(2019, 5, 1), EraType.GENERAL),
    ("令和", "Reiwa", datetime.date(2019, 5, 1), None, EraType.GENERAL)
]

_ERA_DATA_DAIKAKUJI = [
    ("元徳", "Gentoku", datetime.date(1329, 9, 30), datetime.date(1331, 9, 19), EraType.DAIKAKUJI),
    ("元弘", "Genkou", datetime.date(1331, 9, 19), datetime.date(1334, 3, 13), EraType.DAIKAKUJI),
    ("建武", "Kenmu", datetime.date(1334, 3, 13), datetime.date(1336, 4, 19), EraType.DAIKAKUJI),
    ("延元", "Engen", datetime.date(1336, 4, 19), datetime.date(1340, 6, 2), EraType.DAIKAKUJI),
    ("興国", "Koukoku", datetime.date(1340, 6, 2), datetime.date(1347, 1, 28), EraType.DAIKAKUJI),
    ("正平", "Syouhei", datetime.date(1347, 1, 28), datetime.date(1370, 8, 24), EraType.DAIKAKUJI),
    ("建徳", "Kentoku", datetime.date(1370, 8, 24), datetime.date(1372, 5, 9), EraType.DAIKAKUJI),
    ("文中", "Bunchuu", datetime.date(1372, 5, 9), datetime.date(1375, 7, 4), EraType.DAIKAKUJI),
    ("天授", "Tenju", datetime.date(1375, 7, 4), datetime.date(1381, 3, 14), EraType.DAIKAKUJI),
    ("弘和", "Kouwa", datetime.date(1381, 3, 14), datetime.date(1384, 5, 26), EraType.DAIKAKUJI),
    ("元中", "Genchuu", datetime.date(1384, 5, 26), datetime.date(1392, 11, 27), EraType.DAIKAKUJI)
]

_ERA_DATA_JIMYOUIN = [
    ("元徳", "Gentoku", datetime.date(1329, 9, 30), datetime.date(1332, 5, 31), EraType.JIMYOUIN),
    ("正慶", "Shoukyou", datetime.date(1332, 5, 31), datetime.date(1333, 7, 15), EraType.JIMYOUIN),
    ("建武", "Kenmu", datetime.date(1334, 3, 13), datetime.date(1338, 10, 19), EraType.JIMYOUIN),
    ("暦応", "Ryakuou", datetime.date(1338, 10, 19), datetime.date(1342, 6, 9), EraType.JIMYOUIN),
    ("康永", "Kouei", datetime.date(1342, 6, 9), datetime.date(1345, 11, 23), EraType.JIMYOUIN),
    ("貞和", "Jouwa", datetime.date(1345, 11, 23), datetime.date(1350, 4, 12), EraType.JIMYOUIN),
    ("観応", "Kannou", datetime.date(1350, 4, 12), datetime.date(1352, 11, 12), EraType.JIMYOUIN),
    ("文和", "Bunna", datetime.date(1352, 11, 12), datetime.date(1356, 5, 7), EraType.JIMYOUIN),
    ("延文", "Enbun", datetime.date(1356, 5, 7), datetime.date(1361, 5, 12), EraType.JIMYOUIN),
    ("康安", "Kouan", datetime.date(1361, 5, 12), datetime.date(1362, 10, 19), EraType.JIMYOUIN),
    ("貞治", "Jouji", datetime.date(1362, 10, 19), datetime.date(1368, 3, 15), EraType.JIMYOUIN),
    ("応安", "Ouan", datetime.date(1368, 3, 15), datetime.date(1375, 4, 6), EraType.JIMYOUIN),
    ("永和", "Eiwa", datetime.date(1375, 4, 6), datetime.date(1379, 4, 17), EraType.JIMYOUIN),
    ("康暦", "Kouryaku", datetime.date(1379, 4, 17), datetime.date(1381, 3, 28), EraType.JIMYOUIN),
    ("永徳", "Eitoku", datetime.date(1381, 3, 28), datetime.date(1384, 3, 27), EraType.JIMYOUIN),
    ("至徳", "Sitoku", datetime.date(1384, 3, 27), datetime.date(1387, 10, 13), EraType.JIMYOUIN),
    ("嘉慶", "Kakyou", datetime.date(1387, 10, 13), datetime.date(1389, 3, 15), EraType.JIMYOUIN),
    ("康応", "Kouou", datetime.date(1389, 3, 15), datetime.date(1390, 4, 20), EraType.JIMYOUIN),
    ("明徳", "Meitoku", datetime.date(1390, 4, 20), datetime.date(1394, 8, 10), EraType.JIMYOUIN)
]
