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

@hangukit/dayjs

v0.1.0

Published

@hangukit/holidays-core의 dayjs 플러그인 — dayjs().isKoreanHoliday(), dayjs().addBusinessDays(n) 등

Readme

@hangukit/dayjs

@hangukit/holidays-coredayjs 플러그인 — dayjs().isKoreanHoliday() · dayjs plugin for @hangukit/holidays-coredayjs().isKoreanHoliday()

한국어 · English


한국어

dayjs.extend() 한 번으로 dayjs 인스턴스에 한국 공휴일·영업일·KRX 휴장일 메서드가 붙습니다. 데이터·로직은 @hangukit/holidays-core에서 옵니다.

설치

npm i @hangukit/dayjs dayjs
# dayjs@^1.11.0

빠른 예

import dayjs from "dayjs";
import koreaHolidays from "@hangukit/dayjs";

dayjs.extend(koreaHolidays);

dayjs("2024-02-12").isKoreanHoliday();                       // true (설날 대체공휴일)
dayjs("2024-02-13").isKoreanBusinessDay();                   // true (영업일)
dayjs("2026-07-17").isKoreanHoliday();                       // true (제헌절 2026 부활)

dayjs("2025-01-27").addBusinessDays(3).format("YYYY-MM-DD"); // "2025-02-04" — 설날 연휴 건너뜀
dayjs("2024-02-13").subtractBusinessDays(3).format("YYYY-MM-DD");
dayjs("2024-02-09").nextKoreanBusinessDay().format("YYYY-MM-DD"); // "2024-02-13"

dayjs("2024-12-31").isKrxBusinessDay();                      // false — KRX 연말 폐장
dayjs("2025-05-01").isKrxHoliday();                          // true  — 근로자의날 (2025: KRX만)

CJS 사용

const dayjs = require("dayjs");
const koreaHolidays = require("@hangukit/dayjs");          // 플러그인 함수가 그대로 옴 (.default 불필요)
dayjs.extend(koreaHolidays);

추가되는 메서드

| 메서드 | 반환 | | --- | --- | | dayjs().isKoreanHoliday() | boolean | | dayjs().koreanHolidays() | readonly HolidayEntry[] | | dayjs().isKoreanBusinessDay() | boolean | | dayjs().addBusinessDays(n) / subtractBusinessDays(n) | Dayjs | | dayjs().nextKoreanBusinessDay() / previousKoreanBusinessDay() | Dayjs | | dayjs().businessDaysTo(other) | number (start 제외, end 포함) | | dayjs().isKrxHoliday() / isKrxBusinessDay() | boolean |

주의사항

  • CJS 인터롭: 빌드는 module.exports = plugin 으로 나옵니다(즉 require("@hangukit/dayjs") 가 곧 플러그인 함수). 타입 선언은 export defaultattwFalseExportDefault 로 표시하지만 esModuleInterop 환경에서는 정상 동작합니다.
  • 데이터 커버 범위(2021~2026) 밖 연도는 holidays-core[] + 1회 경고를 돌려주며, 영업일 산술은 주말 여부로만 계산됩니다. 자세한 동작/주의는 @hangukit/holidays-core.

모노레포

hangukit 모노레포의 일부. native Date 사용자는 @hangukit/date-fns, Temporal.PlainDate 사용자는 @hangukit/temporal.


English

A single dayjs.extend() attaches Korean holiday / business-day / KRX market methods to dayjs instances. Data & logic come from @hangukit/holidays-core.

Install

npm i @hangukit/dayjs dayjs
# dayjs@^1.11.0

Quick example

import dayjs from "dayjs";
import koreaHolidays from "@hangukit/dayjs";

dayjs.extend(koreaHolidays);

dayjs("2024-02-12").isKoreanHoliday();                       // true (substitute for Lunar New Year)
dayjs("2024-02-13").isKoreanBusinessDay();                   // true
dayjs("2026-07-17").isKoreanHoliday();                       // true (Constitution Day, restored 2026)

dayjs("2025-01-27").addBusinessDays(3).format("YYYY-MM-DD"); // "2025-02-04" — skips Lunar New Year stretch
dayjs("2024-02-13").subtractBusinessDays(3).format("YYYY-MM-DD");
dayjs("2024-02-09").nextKoreanBusinessDay().format("YYYY-MM-DD"); // "2024-02-13"

dayjs("2024-12-31").isKrxBusinessDay();                      // false — KRX year-end closure
dayjs("2025-05-01").isKrxHoliday();                          // true  — Labor Day (KRX only in 2025)

CJS usage

const dayjs = require("dayjs");
const koreaHolidays = require("@hangukit/dayjs");          // the plugin function directly (no .default)
dayjs.extend(koreaHolidays);

Methods added

| Method | Returns | | --- | --- | | dayjs().isKoreanHoliday() | boolean | | dayjs().koreanHolidays() | readonly HolidayEntry[] | | dayjs().isKoreanBusinessDay() | boolean | | dayjs().addBusinessDays(n) / subtractBusinessDays(n) | Dayjs | | dayjs().nextKoreanBusinessDay() / previousKoreanBusinessDay() | Dayjs | | dayjs().businessDaysTo(other) | number (excludes start, includes end) | | dayjs().isKrxHoliday() / isKrxBusinessDay() | boolean |

Notes

  • CJS interop: the CJS build emits module.exports = plugin (i.e. require("@hangukit/dayjs") is the plugin function directly). The type declaration uses export default, so attw flags FalseExportDefault, but runtime works fine under esModuleInterop (the common default).
  • For years outside the bundled 2021–2026 range, holidays-core returns [] and warns once; business-day arithmetic then considers weekends only. See @hangukit/holidays-core for details.

Monorepo

Part of the hangukit monorepo. Native Date users: @hangukit/date-fns; Temporal.PlainDate users: @hangukit/temporal.


MIT License