1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

Add the National Day of the People's Republic of China

This commit is contained in:
程序员小墨 2022-11-20 00:55:07 +08:00
parent 07d4898567
commit 5340ca612f
17 changed files with 303 additions and 6 deletions

View File

@ -4,11 +4,22 @@ const path = require('path');
let order = fs.readFileSync(path.join(__dirname, '../data/order.json'), 'utf8');
order = JSON.parse(order);
let holidayList = [];
let simplifyField = fs.readFileSync(path.join(__dirname, '../data/simplify_field.json'), 'utf8');
simplifyField = JSON.parse(simplifyField);
let holidayList = [], simplifyHolidayList = [];
for (let holidayId of order) {
let holiday = fs.readFileSync(path.join(__dirname, `../data/holiday/${holidayId}.json`), 'utf8');
holiday = JSON.parse(holiday);
holidayList.push(holiday);
let simplifyHoliday = {};
simplifyField.forEach(field => simplifyHoliday[field] = holiday[field]);
simplifyHolidayList.push(simplifyHoliday);
}
fs.writeFileSync(path.join(__dirname, `../holiday.min.json`), JSON.stringify(holidayList));
fs.writeFileSync(path.join(__dirname, `../holiday.json`), JSON.stringify(holidayList, null, 4));
fs.writeFileSync(path.join(__dirname, `../dist/holiday.json`), JSON.stringify(holidayList, null, 4));
fs.writeFileSync(path.join(__dirname, `../dist/holiday.min.json`), JSON.stringify(holidayList));
fs.writeFileSync(path.join(__dirname, `../dist/holiday.simplify.json`), JSON.stringify(simplifyHolidayList, null, 4));
fs.writeFileSync(path.join(__dirname, `../dist/holiday.simplify.min.json`), JSON.stringify(simplifyHolidayList));

View File

@ -12,6 +12,7 @@
],
"friendlyDate": "清明节前一二日",
"date": "~4/3",
"holidayDate": "",
"calendar": "solar",
"friendlyType": "中国传统节日",
"type": "节日类型 Chinese",

View File

@ -13,6 +13,7 @@
],
"friendlyDate": "农历五月初五",
"date": "5/5",
"holidayDate": "",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",

View File

@ -10,6 +10,7 @@
],
"friendlyDate": "公历5月1日",
"date": "5/1",
"holidayDate": "",
"calendar": "solar",
"type": "World",
"friendlyType": "世界上80多个国家的全国性节日",

View File

@ -18,6 +18,7 @@
],
"friendlyDate": "农历八月十五",
"date": "8/15",
"holidayDate": "",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",

View File

@ -11,6 +11,7 @@
],
"friendlyDate": "公历1月1日",
"date": "1/1",
"holidayDate": "",
"calendar": "solar",
"friendlyType": "世界节日",
"type": "World",

View File

@ -14,6 +14,7 @@
],
"friendlyDate": "农历正月初一",
"date": "1/1",
"holidayDate": "",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",

View File

@ -12,6 +12,7 @@
],
"friendlyDate": "斗指乙太阳黄经15°公历4月5日前后",
"date": "~4/4-4/6",
"holidayDate": "",
"calendar": "solar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",

View File

@ -0,0 +1,43 @@
{
"id": "the National Day of the Peoples Republic of China",
"skip": false,
"name": "国庆节",
"fullName": "中华人民共和国国庆节",
"englishName": "the National Day of the People's Republic of China",
"alias": [
"十一",
"国庆节",
"国庆日",
"中国国庆节",
"国庆黄金周"
],
"friendlyDate": "公历10月1日",
"date": "10/1",
"holidayDate": "10/1-10/7",
"calendar": "solar",
"friendlyType": "国庆日",
"type": "Others",
"statutory": true,
"solarTerms": false,
"desc": "中华人民共和国中央人民政府宣布自1949年起以每年的10月1日即中华人民共和国宣告成立的日子称为国庆节。",
"subFestival": [],
"activity": [
"举国同庆",
"阅兵仪式",
"国庆长假"
],
"food": [],
"origin": "中华人民共和国成立",
"meaning": "庆祝中华人民共和国成立",
"process": "",
"location": "中华人民共和国",
"organization": "中华人民共和国国务院",
"startingTime": "1950年",
"popularAreas": "中华人民共和国",
"commemorator": [],
"intangibleCulturalHeritageProtectionUnit": "",
"nationalCulturalHeritage": "",
"worldCulturalHeritage": "",
"baike": "https://baike.baidu.com/item/%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E5%9B%BD%E5%BA%86%E8%8A%82/1041892",
"poetry": []
}

View File

@ -5,5 +5,6 @@
"Tomb-Sweeping Day",
"International Workers Day",
"Dragon Boat Festival",
"Mid-Autumn Festival"
"Mid-Autumn Festival",
"the National Day of the Peoples Republic of China"
]

14
data/simplify_field.json Normal file
View File

@ -0,0 +1,14 @@
[
"name",
"fullName",
"englishName",
"alias",
"friendlyDate",
"date",
"calendar",
"friendlyType",
"type",
"statutory",
"solarTerms",
"desc"
]

View File

@ -7,8 +7,9 @@
"alias": [
"节日别名"
],
"friendlyDate": "友好日期 农历八月十五",
"friendlyDate": "友好日期 农历八月十五 公历1月1日",
"date": "日期 10/1 如果有多个以空格分隔格式10/1 10/12如果是时间范围以-连接格式1/1-12/31如果无法确定准确时间如清明节前面添加~代表不确定,例如~4/4-4/6或~4/5",
"holidayDate": "放假日期 格式同上",
"calendar": "阳历/阴历 solar/lunar",
"friendlyType": "友好节日类型",
"type": "节日类型 Chinese/Chinese-4/Western/World/Others中国传统节日/中国四大传统节日/西方传统节日/世界节日|国际节日/其他类型)",

View File

@ -12,6 +12,7 @@
],
"friendlyDate": "公历1月1日",
"date": "1/1",
"holidayDate": "",
"calendar": "solar",
"friendlyType": "世界节日",
"type": "World",
@ -85,6 +86,7 @@
],
"friendlyDate": "农历正月初一",
"date": "1/1",
"holidayDate": "",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
@ -394,6 +396,7 @@
],
"friendlyDate": "清明节前一二日",
"date": "~4/3",
"holidayDate": "",
"calendar": "solar",
"friendlyType": "中国传统节日",
"type": "节日类型 Chinese",
@ -508,6 +511,7 @@
],
"friendlyDate": "斗指乙太阳黄经15°公历4月5日前后",
"date": "~4/4-4/6",
"holidayDate": "",
"calendar": "solar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
@ -616,6 +620,7 @@
],
"friendlyDate": "公历5月1日",
"date": "5/1",
"holidayDate": "",
"calendar": "solar",
"type": "World",
"friendlyType": "世界上80多个国家的全国性节日",
@ -653,6 +658,7 @@
],
"friendlyDate": "农历五月初五",
"date": "5/5",
"holidayDate": "",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
@ -710,6 +716,7 @@
],
"friendlyDate": "农历八月十五",
"date": "8/15",
"holidayDate": "",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
@ -739,5 +746,56 @@
"worldCulturalHeritage": "",
"baike": "https://baike.baidu.com/item/%E4%B8%AD%E7%A7%8B%E8%8A%82/128234",
"poetry": []
},
{
"id": "the National Day of the Peoples Republic of China",
"skip": false,
"name": "国庆节",
"fullName": "中华人民共和国国庆节",
"englishName": "the National Day of the People's Republic of China",
"alias": [
"十一",
"国庆节",
"国庆日",
"中国国庆节",
"国庆黄金周"
],
"friendlyDate": "公历10月1日",
"date": "10/1",
"holidayDate": "10/1-10/7",
"calendar": "solar",
"friendlyType": "国庆日",
"type": "Others",
"statutory": true,
"solarTerms": false,
"desc": "中华人民共和国中央人民政府宣布自1949年起以每年的10月1日即中华人民共和国宣告成立的日子称为国庆节。",
"subFestival": [],
"activity": [
"举国同庆",
"阅兵仪式",
"国庆长假"
],
"food": [],
"origin": "中华人民共和国成立",
"meaning": "庆祝中华人民共和国成立",
"process": "节日流程",
"location": "中华人民共和国",
"organization": "中华人民共和国国务院",
"startingTime": "1950年",
"popularAreas": "中华人民共和国",
"commemorator": [],
"intangibleCulturalHeritageProtectionUnit": "非物质文化遗产保护单位",
"nationalCulturalHeritage": "",
"worldCulturalHeritage": "",
"baike": "https://baike.baidu.com/item/%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E5%9B%BD%E5%BA%86%E8%8A%82/1041892",
"poetry": [
{
"dynasty": "朝代 晋代/唐代/宋/...",
"status": "作者身份",
"author": "古诗作者 李白",
"name": "古诗名(不加书名号)",
"text": "古诗正文(片段)"
}
]
}
]

1
dist/holiday.min.json vendored Normal file

File diff suppressed because one or more lines are too long

161
dist/holiday.simplify.json vendored Normal file
View File

@ -0,0 +1,161 @@
[
{
"name": "元旦",
"fullName": "元旦",
"englishName": "New Year",
"alias": [
"公历年",
"新历年",
"阳历年"
],
"friendlyDate": "公历1月1日",
"date": "1/1",
"calendar": "solar",
"friendlyType": "世界节日",
"type": "World",
"statutory": true,
"solarTerms": false,
"desc": "元旦即公历的1月1日是世界多数国家通称的“新年”。元谓“始”凡数之始称为“元”谓“日”“元旦”即“初始之日”的意思。“元旦”通常指历法中的首月首日。"
},
{
"name": "春节",
"fullName": "春节",
"englishName": "Spring Festival / Chinese New Year",
"alias": [
"新春",
"岁节",
"年节",
"新禧",
"新年",
"大年"
],
"friendlyDate": "农历正月初一",
"date": "1/1",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
"statutory": true,
"solarTerms": false,
"desc": "春节Spring Festival即中国农历新年俗称新春、新岁、岁旦等口头上又称过年、过大年。春节历史悠久由上古时代岁首祈岁祭祀演变而来。万物本乎天、人本乎祖祈岁祭祀、敬天法祖报本反始也。春节的起源蕴含着深邃的文化内涵在传承发展中承载了丰厚的历史文化底蕴。在春节期间全国各地均有举行各种庆贺新春活动带有浓郁的各地地方特色。这些活动以除旧布新、驱邪攘灾、拜神祭祖、纳福祈年为主要内容形式丰富多彩凝聚着中华传统文化精华。"
},
{
"name": "寒食节",
"fullName": "寒食节",
"englishName": "Cold food festival",
"alias": [
"禁烟节",
"冷节",
"百五节",
"禁火节"
],
"friendlyDate": "清明节前一二日",
"date": "~4/3",
"calendar": "solar",
"friendlyType": "中国传统节日",
"type": "节日类型 Chinese",
"statutory": false,
"solarTerms": false,
"desc": "寒食节中国传统节日在夏历冬至后的105日清明节前一二日。是日初为节时禁烟火只吃冷食。并在后世的发展中逐渐增加了祭扫、踏青、秋千、蹴鞠、牵勾、斗鸡等风俗寒食节前后绵延两千余年曾被称为中国民间第一大祭日。寒食节是汉族传统节日中唯一以饮食习俗来命名的节日。"
},
{
"name": "清明节",
"fullName": "清明节",
"englishName": "Tomb-Sweeping Day / The Pure Brightness Day / The Mourning Day",
"alias": [
"踏青节",
"行清节",
"三月节",
"祭祖节"
],
"friendlyDate": "斗指乙太阳黄经15°公历4月5日前后",
"date": "~4/4-4/6",
"calendar": "solar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
"statutory": true,
"solarTerms": true,
"desc": "清明节,又称踏青节、行清节、三月节、祭祖节等,节期在仲春与暮春之交。清明节源自上古时代的祖先信仰与春祭礼俗,是中华民族最隆重盛大的祭祖大节。清明节兼具自然与人文两大内涵,既是自然节气点,也是传统节日,扫墓祭祖与踏青郊游是清明节的两大礼俗主题,这两大传统礼俗主题在中国自古传承,至今不辍。"
},
{
"name": "劳动节",
"fullName": "五一国际劳动节",
"englishName": "International Workers' Day / May Day",
"alias": [
"国际劳动节",
"国际示威游行日"
],
"friendlyDate": "公历5月1日",
"date": "5/1",
"calendar": "solar",
"friendlyType": "世界上80多个国家的全国性节日",
"type": "World",
"statutory": true,
"solarTerms": false,
"desc": "国际劳动节又称“五一国际劳动节”“国际示威游行日”是世界上80多个国家的全国性节日。定在每年的五月一日。它是全世界劳动人民共同拥有的节日。"
},
{
"name": "端午节",
"fullName": "端午节",
"englishName": "Dragon Boat Festival",
"alias": [
"端阳节",
"龙节",
"正阳节",
"龙舟节",
"天中节"
],
"friendlyDate": "农历五月初五",
"date": "5/5",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
"statutory": true,
"solarTerms": false,
"desc": "端午节,又称端阳节、龙舟节、重五节、天中节等,是集拜神祭祖、祈福辟邪、欢庆娱乐和饮食为一体的民俗大节。端午节源于自然天象崇拜,由上古时代祭龙演变而来。仲夏端午,苍龙七宿飞升于正南中央,处在全年最“中正”之位,正如《易经·乾卦》第五爻:“飞龙在天”。端午是“飞龙在天”吉祥日,龙及龙舟文化始终贯穿在端午节的传承历史中。"
},
{
"name": "中秋节",
"fullName": "中秋节",
"englishName": "Mid-Autumn Festival",
"alias": [
"祭月节",
"月光诞",
"月夕",
"秋节",
"仲秋节",
"拜月节",
"月娘节",
"月亮节",
"团圆节",
"秋夕"
],
"friendlyDate": "农历八月十五",
"date": "8/15",
"calendar": "lunar",
"friendlyType": "中国四大传统节日之一",
"type": "Chinese-4",
"statutory": true,
"solarTerms": false,
"desc": "中秋节,又称祭月节、月光诞、月夕、秋节、仲秋节、拜月节、月娘节、月亮节、团圆节等,是中国民间传统节日。中秋节源自对天象的崇拜,由上古时代秋夕祭月演变而来。中秋节自古便有祭月、赏月、吃月饼、看花灯、赏桂花、饮桂花酒等民俗,流传至今,经久不息。"
},
{
"name": "国庆节",
"fullName": "中华人民共和国国庆节",
"englishName": "the National Day of the People's Republic of China",
"alias": [
"十一",
"国庆节",
"国庆日",
"中国国庆节",
"国庆黄金周"
],
"friendlyDate": "公历10月1日",
"date": "10/1",
"calendar": "solar",
"friendlyType": "国庆日",
"type": "Others",
"statutory": true,
"solarTerms": false,
"desc": "中华人民共和国中央人民政府宣布自1949年起以每年的10月1日即中华人民共和国宣告成立的日子称为国庆节。"
}
]

1
dist/holiday.simplify.min.json vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long