PHPackages                             jayding/chinese-holiday - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jayding/chinese-holiday

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jayding/chinese-holiday
=======================

check whether it is a working day

1.0.6(5y ago)175MITPHPPHP ^7.0

Since Dec 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jayding8/chinese-holiday)[ Packagist](https://packagist.org/packages/jayding/chinese-holiday)[ RSS](/packages/jayding-chinese-holiday/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

\[TOC\]

jayding/chinese-holiday
-----------------------

[](#jaydingchinese-holiday)

### 前言

[](#前言)

快速获取指定 年 月 日的节假日信息，测试非商用

### 快速上手

[](#快速上手)

- composer requrie jayding/chinese-holiday

```
$holiday = new \Holiday\Holiday();
var_dump($holiday->check('2020-10-01'));
```

### 获取指定年份、月份的节日

[](#获取指定年份月份的节日)

**接口名**

```
getHolidayYear('2020')				年份
getHolidayMonth('2020-08')			月份

```

**返回值说明**

```
{
  "code": 0,               // 0服务正常。-1服务出错
  "holiday": {
    "10-01": {
      "holiday": true,     // 该字段一定为true
      "name": "国庆节",     // 节假日的中文名。
      "wage": 3,           // 薪资倍数，3表示是3倍工资
      "date": "2018-10-01" // 节假日的日期
    },
    "10-02": {
      "holiday": true,     // 该字段一定为true
      "name": "国庆节",     // 节假日的中文名。
      "wage": 3,           // 薪资倍数，3表示是3倍工资
      "date": "2018-10-01" // 节假日的日期
    }
  },
  "type": {                     // 只有明确指定参数 type=Y 时才返回类型信息
    "2018-10-01": {             // 一一对应holiday对象的key，holiday有多少个这里就有多少个
      "type": enum(0, 1, 2, 3), // 节假日类型，分别表示 工作日、周末、节日、调休。
      "name": "周六",            // 节假日类型中文名，可能值为 周一 至 周日、假期的名字、某某调休。
      "week": enum(1 - 7)       // 一周中的第几天。值为 1 - 7，分别表示 周一 至 周日。
    }
  }
}

```

### 获取指定日期

[](#获取指定日期)

**接口名**

```
getHolidayDay(2020-08-02)

```

**返回值说明**

```
{
  "code": 0,              // 0服务正常。-1服务出错
  "type": {
    "type": enum(0, 1, 2, 3), // 节假日类型，分别表示 工作日、周末、节日、调休。
    "name": "周六",         // 节假日类型中文名，可能值为 周一 至 周日、假期的名字、某某调休。
    "week": enum(1 - 7)    // 一周中的第几天。值为 1 - 7，分别表示 周一 至 周日。
  },
  "holiday": {
    "holiday": false,     // true表示是节假日，false表示是调休
    "name": "国庆前调休",  // 节假日的中文名。如果是调休，则是调休的中文名，例如'国庆前调休'
    "wage": 1,            // 薪资倍数，1表示是1倍工资
    "after": false,       // 只在调休下有该字段。true表示放完假后调休，false表示先调休再放假
    "target": '国庆节'     // 只在调休下有该字段。表示调休的节假日
  }
}

```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

2024d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/508ee8a7c94d8f3662610976e794c201f7054308a7bf5813c99b10f98c605d45?d=identicon)[jayding8](/maintainers/jayding8)

### Embed Badge

![Health badge](/badges/jayding-chinese-holiday/health.svg)

```
[![Health](https://phpackages.com/badges/jayding-chinese-holiday/health.svg)](https://phpackages.com/packages/jayding-chinese-holiday)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[nfse-nacional/nfse-php

This is my package nfse

1523.1k](/packages/nfse-nacional-nfse-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
