Skip to content

kyungseopk1m/holidays-kr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

holidays-kr

npm version npm downloads license TypeScript Known Vulnerabilities CodeQL

ํ•œ๊ตญ์–ด | 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


English

Introduction

  • 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.

Install

npm i @kyungseopk1m/holidays-kr

Usage

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

Output

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;
}

License

MIT

About

[NPM] ๐Ÿ‡ฐ๐Ÿ‡ท South Korea Public Holidays / ๋Œ€ํ•œ๋ฏผ๊ตญ ๊ณตํœด์ผ ๋ฐ์ดํ„ฐ

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors