npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

korean-holidays

v1.0.0

Published

Korean holidays library with substitute holidays (대체공휴일) support

Readme

korean-holidays

대한민국 공휴일 라이브러리 - 대체공휴일 지원

Korean holidays library with substitute holidays (대체공휴일) support.

Features

  • 모든 대한민국 공휴일 지원 (음력 공휴일 포함)
  • 대체공휴일 자동 계산
    • 2014년~: 설날/추석/어린이날
    • 2021년~: 3·1절, 광복절, 개천절, 한글날
    • 2023년~: 석가탄신일, 성탄절
  • 제헌절 2026년부터 공휴일 복원 지원
  • 영업일 계산 유틸리티

Installation

npm install korean-holidays

Usage

공휴일 목록 조회

import { getHolidays } from 'korean-holidays'

const holidays = getHolidays(2026)

holidays.forEach(holiday => {
  console.log(`${holiday.date.toISOString().split('T')[0]} - ${holiday.nameKo}`)
})

특정 날짜가 공휴일인지 확인

import { isHoliday } from 'korean-holidays'

const holiday = isHoliday(new Date(2026, 0, 1))
if (holiday) {
  console.log(`${holiday.nameKo}입니다!`) // 신정입니다!
}

영업일 확인

import { isBusinessDay } from 'korean-holidays'

const date = new Date(2026, 0, 1) // 신정
console.log(isBusinessDay(date)) // false (공휴일)

const date2 = new Date(2026, 0, 2) // 금요일
console.log(isBusinessDay(date2)) // true

영업일 계산

import { addBusinessDays } from 'korean-holidays'

// 2026년 1월 2일(금) + 2영업일
const result = addBusinessDays(new Date(2026, 0, 2), 2)
// 주말을 건너뛰어 1월 6일(화)

영업일 수 계산

import { countBusinessDays } from 'korean-holidays'

const start = new Date(2026, 0, 1)
const end = new Date(2026, 0, 10)
const businessDays = countBusinessDays(start, end)

API

getHolidays(year: number, options?: HolidayOptions): Holiday[]

주어진 연도의 모든 공휴일을 반환합니다.

Options:

  • includeSubstitute: 대체공휴일 포함 여부 (기본값: true)

isHoliday(date: Date, options?: HolidayOptions): Holiday | null

특정 날짜가 공휴일인지 확인합니다.

isBusinessDay(date: Date, options?: HolidayOptions): boolean

특정 날짜가 영업일(평일이면서 공휴일이 아닌 날)인지 확인합니다.

addBusinessDays(startDate: Date, days: number, options?: HolidayOptions): Date

시작일로부터 n 영업일 후의 날짜를 반환합니다.

countBusinessDays(startDate: Date, endDate: Date, options?: HolidayOptions): number

두 날짜 사이의 영업일 수를 반환합니다.

Holiday Interface

interface Holiday {
  date: Date
  name: string      // 영문 이름
  nameKo: string    // 한글 이름
  isSubstitute: boolean  // 대체공휴일 여부
  isLunar: boolean  // 음력 공휴일 여부
}

지원하는 공휴일

고정 공휴일

| 날짜 | 공휴일 | |------|--------| | 1월 1일 | 신정 | | 3월 1일 | 3·1절 | | 5월 5일 | 어린이날 | | 6월 6일 | 현충일 | | 7월 17일 | 제헌절 (2026년~) | | 8월 15일 | 광복절 | | 10월 3일 | 개천절 | | 10월 9일 | 한글날 | | 12월 25일 | 성탄절 |

음력 공휴일

| 음력 날짜 | 공휴일 | |-----------|--------| | 1월 1일 ± 1일 | 설날 연휴 (3일) | | 4월 8일 | 석가탄신일 | | 8월 15일 ± 1일 | 추석 연휴 (3일) |

License

MIT