
ํ๊ตญ์ด | English
- ๋ณ๋์ API ํค ์์ด ๋จ ํ ๋ฒ์ ํธ์ถ๋ก ๊ฐํธํ๊ฒ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
- ๋ชจ๋ ๋ฐ์ดํฐ๋ ๊ณต๊ณต๋ฐ์ดํฐํฌํธ์ ํตํด ํ๊ตญ์ฒ๋ฌธ์ฐ๊ตฌ์์ ๊ณต์ ๊ณตํด์ผ ๋ฐ์ดํฐ๋ฒ ์ด์ค์์ ์ง์ ์ ๊ณต๋ฉ๋๋ค.
- 2004๋
์ดํ์ ๊ณตํด์ผ ๋ฐ์ดํฐ๋ฅผ ์ ๊ณตํ๋ฉฐ, ๋งค์ 3ํ ์ ๊ธฐ ์
๋ฐ์ดํธ๋ก ์ต์ ์ ๋ณด๋ฅผ ์ ์งํฉ๋๋ค.
- ๋งค๋
๋ค์ ํด์ ๊ณตํด์ผ ์ ๋ณด๋ฅผ ์กฐํํ ์ ์์ง๋ง, 2๋
ํ์ ๋ฐ์ดํฐ๋ ํฌํจ๋์ง ์์ต๋๋ค.
commonjs์ ESM ๋ชจ๋ ์ง์ํฉ๋๋ค.
npm i @kyungseopk1m/holidays-kr
import { holidays } from "@kyungseopk1m/holidays-kr";
const result = await holidays("2025");
console.log(result); // 2025.01 ~ 2025.12 ๋ฐ์ดํฐ
// ๋๋
const { holidays } = require("@kyungseopk1m/holidays-kr");
const data = await holidays("2010", "2015");
console.log(data); // 2010.01 ~ 2015.12 ๋ฐ์ดํฐ
| ์์ฑ |
์ค๋ช
|
| success |
API ํธ์ถ ์ฑ๊ณต ์ฌ๋ถ |
| message |
์๋ต ๋ฉ์์ง |
| name |
๊ณตํด์ผ ์ด๋ฆ (ํ๊ธ) |
| date |
YYYYMMDD ํ์์ ๋ ์ง |
interface response {
success: boolean;
message: string;
data: example[];
}
interface example {
date: number;
name: string;
}
MIT
- No need for a separate API keyโjust fetch data effortlessly with a single call.
- All data is sourced directly from the Korea Astronomical Research Institute's official holiday database via the Public Data Portal.
- Holiday data is available from 2004 onward, with regular updates three times a month to keep it current.
- You can retrieve holiday information for the upcoming year annually, but data for the year after next is not included.
- Supports both
commonjs and ESM.
npm i @kyungseopk1m/holidays-kr
import { holidays } from "@kyungseopk1m/holidays-kr";
const result = await holidays("2025");
console.log(result); // Data from 2025.01 to 2025.12
// or
const { holidays } = require("@kyungseopk1m/holidays-kr");
const data = await holidays("2010", "2015");
console.log(data); // Data from 2010.01 to 2015.12
| Property |
Description |
| success |
API call success status |
| message |
Response message |
| name |
Holiday name (in Korean) |
| date |
Date in 'YYYYMMDD' format |
interface response {
success: boolean;
message: string;
data: example[];
}
interface example {
date: number;
name: string;
}
MIT