# is-holiday-cn

> 检查一天是否是中国节假日，包含调休，数据来源：https://github.com/NateScarlet/holiday-cn

Latest version **1.0.3** (published 2023-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-holiday-cn
pnpm add is-holiday-cn
yarn add is-holiday-cn
bun add is-holiday-cn
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-12-28 |
| First published | 2023-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | moonvy |

## Links

- npm: https://www.npmjs.com/package/is-holiday-cn
- npm.io page: https://npm.io/package/is-holiday-cn

## Recent versions

- 1.0.3 (latest) — 2023-12-28
- 1.0.2 — 2023-12-28
- 1.0.1 — 2023-12-28
- 1.0.0 — 2023-12-28

## README

# isHolidayCn

检查一天是否是中国节假日，包含调休，数据来源：https://github.com/NateScarlet/holiday-cn

```ts
import { isHolidayCn, getHolidayCn } from "is-holiday-cn"

isHolidayCn(new Date()) // false
getHolidayCn(new Date()) // { isHoliday: true, isWeekEnd: false, isTOIL: false, dayName: '劳动节' }
```

```ts
function isHolidayCn(date: Date): boolean
function getHolidayCn(date: Date): {
    // 是否节假日
    isHoliday: boolean
    // 是否是周末
    isWeekEnd: boolean
    // 是否是调休
    isTOIL: boolean
    // 如果是节假日，返回节假日名称
    dayName: string
}
```

---
_Source: https://npm.io/package/is-holiday-cn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
