Browse Source

feat: add 2025 Holidays

Yaavi 8 months ago
parent
commit
05f686e9e1
3 changed files with 22 additions and 3 deletions
  1. 2 2
      package-lock.json
  2. 1 1
      package.json
  3. 19 0
      src/holidays/generate.ts

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "chinese-days",
-  "version": "1.3.2",
+  "version": "1.3.3",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "chinese-days",
-      "version": "1.3.2",
+      "version": "1.3.3",
       "license": "MIT",
       "devDependencies": {
         "@types/jest": "^29.5.12",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "chinese-days",
-  "version": "1.3.2",
+  "version": "1.3.3",
   "description": "中国节假日、调休日、工作日、24节气查询,农历阳历互转,支持 TS、CommonJS、UMD 模块化使用,提供 ics 日历格式,可供 Google Calendar、Apple Calendar、Microsoft Outlook 等客户端订阅。",
   "main": "dist/index.min.js",
   "module": "dist/index.es.js",

+ 19 - 0
src/holidays/generate.ts

@@ -2,6 +2,25 @@ import Arrangement from "./arrangement.ts"
 
 export default () => {
   const arrangement = new Arrangement()
+  /**
+   * 2025
+   * https://www.gov.cn/zhengce/zhengceku/202411/content_6986383.htm
+   * 一、元旦:1月1日(周三)放假1天,不调休。
+   * 二、春节:1月28日(农历除夕、周二)至2月4日(农历正月初七、周二)放假调休,共8天。1月26日(周日)、2月8日(周六)上班。
+   * 三、清明节:4月4日(周五)至6日(周日)放假,共3天。
+   * 四、劳动节:5月1日(周四)至5日(周一)放假调休,共5天。4月27日(周日)上班。
+   * 五、端午节:5月31日(周六)至6月2日(周一)放假,共3天。
+   * 六、国庆节、中秋节:10月1日(周三)至8日(周三)放假调休,共8天。9月28日(周日)、10月11日(周六)上班。
+   */
+  arrangement.y(2025)
+    .ny().r(1, 1)
+    .s().r(1, 28).to(2, 4).w(1, 26).w(2, 8).i(2, 3).i(2, 4)
+    .t().r(4, 4).to(4, 6)
+    .l().r(5, 1).to(5, 5).w(4, 27).i(5, 5)
+    .d().r(5, 31).to(6, 2)
+    .m().r(10, 6)
+    .n().r(10, 1).to(10, 8).w(9, 28).w(10, 11).i(10, 7).i(10, 8)
+
   /**
    * 2024
    * https://www.gov.cn/zhengce/content/202310/content_6911527.htm