Skip to content

Commit

Permalink
Support year 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
bastengao committed Dec 10, 2022
1 parent b91291b commit 199b9ed
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.5.0

Support year 2023 offline data.

# v1.4.1

Fix 2022 spring festival.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ChineseHolidays.ready().then(function(book) {

支持在线更新[节假日数据](https://github.com/bastengao/chinese-holidays-data),如果无法联网则使用本地打包的数据。

* [支持 2023 年](http://www.gov.cn/zhengce/content/2022-12/08/content_5730844.htm)
* [支持 2022 年](http://www.gov.cn/zhengce/content/2021-10/25/content_5644835.htm)
* [支持 2021 年](http://www.gov.cn/zhengce/content/2020-11/25/content_5564127.htm)
* [支持 2020 年](http://www.gov.cn/zhengce/content/2019-11/21/content_5454164.htm)
Expand Down
57 changes: 57 additions & 0 deletions data/2023.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"name": "元旦",
"range": ["2022-12-31", "2023-01-02"],
"type": "holiday"
},
{
"name": "春节",
"range": ["2023-01-21", "2023-01-27"],
"type": "holiday"
},
{
"name": "春节",
"range": ["2023-01-28", "2023-01-29"],
"type": "workingday"
},
{
"name": "清明节",
"range": ["2023-04-05"],
"type": "holiday"
},
{
"name": "劳动节",
"range": ["2023-04-23"],
"type": "workingday"
},
{
"name": "劳动节",
"range": ["2023-04-29", "2023-05-03"],
"type": "holiday"
},
{
"name": "劳动节",
"range": ["2023-05-06"],
"type": "workingday"
},
{
"name": "端午节",
"range": ["2023-06-22", "2023-06-24"],
"type": "holiday"
},
{
"name": "端午节",
"range": ["2023-06-25"],
"type": "workingday"
},
{
"name": "中秋节/国庆节",
"range": ["2023-09-29", "2023-10-06"],
"type": "holiday"
},
{
"name": "中秋节/国庆节",
"range": ["2023-10-07", "2023-10-08"],
"type": "workingday"
}
]
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chinese-holidays",
"version": "1.4.1",
"version": "1.5.0",
"description": "Chinese holidays",
"main": "lib/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion test/bundled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Bundled = require('../lib/bundled');

describe('Bundled', () => {
it('loadEvents', () => {
should.equal(Bundled.loadEvents().length, 87);
should.equal(Bundled.loadEvents().length, 98);

const days = Bundled.loadEvents()[0].days();
should.equal(days.length, 3);
Expand Down

0 comments on commit 199b9ed

Please sign in to comment.