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/temporal

v0.1.0

Published

한국 공휴일·영업일·KRX 휴장일 헬퍼 — Temporal.PlainDate 인/아웃

Downloads

27

Readme

@hangukit/temporal

@hangukit/holidays-coreTemporal.PlainDate 인/아웃으로 노출 · Temporal.PlainDate in/out wrapper around @hangukit/holidays-core

한국어 · English


한국어

Temporal.PlainDate 는 시간대가 없는 달력 날짜라 한국 공휴일·영업일 모델과 정확히 일치합니다 — 시간대 함정이 원천적으로 없습니다. 네이티브 Temporal 이 표준화되기 전까지는 @js-temporal/polyfill 이 런타임·타입 출처입니다(peerDependency).

설치

npm i @hangukit/temporal @js-temporal/polyfill
# @js-temporal/polyfill@^0.4.4 || ^0.5.0

빠른 예

import { Temporal } from "@js-temporal/polyfill";
import {
  isKoreanHoliday, isKoreanBusinessDay,
  addKoreanBusinessDays, koreanBusinessDaysBetween,
  isKrxBusinessDay, koreanHolidaysOf,
} from "@hangukit/temporal";

isKoreanHoliday(Temporal.PlainDate.from("2024-02-12"));                  // true (설날 대체공휴일)
isKoreanBusinessDay(Temporal.PlainDate.from("2024-02-13"));              // true

addKoreanBusinessDays(Temporal.PlainDate.from("2025-01-27"), 3).toString(); // "2025-02-04"

koreanBusinessDaysBetween(
  Temporal.PlainDate.from("2024-12-30"),
  Temporal.PlainDate.from("2025-01-03"),
);                                                                       // 3

isKrxBusinessDay(Temporal.PlainDate.from("2024-12-31"));                 // false

API

모든 함수가 Temporal.PlainDate 를 받아 같은 타입 또는 원시값을 돌려줍니다.

| Export | 시그니처 | | --- | --- | | isKoreanHoliday(date) | (PlainDate) => boolean | | koreanHolidaysOf(date) | (PlainDate) => readonly HolidayEntry[] | | isKoreanBusinessDay(date) | (PlainDate) => boolean | | addKoreanBusinessDays(date, n, opts?) / subKoreanBusinessDays | (PlainDate, number) => PlainDate | | nextKoreanBusinessDay / previousKoreanBusinessDay | (PlainDate) => PlainDate | | nearestKoreanBusinessDayForward / Backward | (PlainDate) => PlainDate | | koreanBusinessDaysBetween(start, end, opts?) | (PlainDate, PlainDate) => number | | isKrxHoliday(date) / isKrxBusinessDay(date) | (PlainDate) => boolean | | type KrTemporalOptions | { extraHolidays?: readonly PlainDate[] } | | type HolidayEntry | holidays-core 재출력 |

주의사항

  • 변환은 PlainDate.toString() 앞 10자(항상 ISO 날짜) ↔ Temporal.PlainDate.from() 으로 합니다. 비-ISO 달력의 PlainDate 도 toString() 이 ISO 날짜를 앞에 두므로 안전합니다.
  • 네이티브 Temporal 이 환경에 있어도 본 패키지는 폴리필을 import 합니다(타입 일관성). 폴리필이 표준의 reference implementation 이라 동작은 동일합니다.
  • 2021~2026 범위 밖 연도는 @hangukit/holidays-core 의 동작(빈 결과 + 1회 경고)을 따릅니다.

모노레포

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


English

Temporal.PlainDate is a timezone-free calendar date, matching the Korean holiday/business-day model exactly — no timezone gotchas at all. Until native Temporal is standardized, @js-temporal/polyfill is the runtime & type source (peer dependency).

Install

npm i @hangukit/temporal @js-temporal/polyfill
# @js-temporal/polyfill@^0.4.4 || ^0.5.0

Quick example

import { Temporal } from "@js-temporal/polyfill";
import {
  isKoreanHoliday, isKoreanBusinessDay,
  addKoreanBusinessDays, koreanBusinessDaysBetween,
  isKrxBusinessDay, koreanHolidaysOf,
} from "@hangukit/temporal";

isKoreanHoliday(Temporal.PlainDate.from("2024-02-12"));                  // true (Lunar New Year substitute)
isKoreanBusinessDay(Temporal.PlainDate.from("2024-02-13"));              // true

addKoreanBusinessDays(Temporal.PlainDate.from("2025-01-27"), 3).toString(); // "2025-02-04"

koreanBusinessDaysBetween(
  Temporal.PlainDate.from("2024-12-30"),
  Temporal.PlainDate.from("2025-01-03"),
);                                                                       // 3

isKrxBusinessDay(Temporal.PlainDate.from("2024-12-31"));                 // false

API

Every function takes a Temporal.PlainDate and returns one (or a primitive).

| Export | Signature | | --- | --- | | isKoreanHoliday(date) | (PlainDate) => boolean | | koreanHolidaysOf(date) | (PlainDate) => readonly HolidayEntry[] | | isKoreanBusinessDay(date) | (PlainDate) => boolean | | addKoreanBusinessDays(date, n, opts?) / subKoreanBusinessDays | (PlainDate, number) => PlainDate | | nextKoreanBusinessDay / previousKoreanBusinessDay | (PlainDate) => PlainDate | | nearestKoreanBusinessDayForward / Backward | (PlainDate) => PlainDate | | koreanBusinessDaysBetween(start, end, opts?) | (PlainDate, PlainDate) => number | | isKrxHoliday(date) / isKrxBusinessDay(date) | (PlainDate) => boolean | | type KrTemporalOptions | { extraHolidays?: readonly PlainDate[] } | | type HolidayEntry | Re-exported from holidays-core |

Notes

  • Conversion uses the first 10 chars of PlainDate.toString() (always the ISO date) ↔ Temporal.PlainDate.from(). This stays safe even for non-ISO calendars because toString() always emits the ISO date first.
  • The package imports the polyfill even when native Temporal is available (for type consistency). Behavior is identical — the polyfill is the standard's reference implementation.
  • For years outside 2021–2026, behavior follows @hangukit/holidays-core (empty result + one-time warning).

Monorepo

Part of the hangukit monorepo. dayjs users: @hangukit/dayjs; native Date users: @hangukit/date-fns.


MIT License