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 🙏

© 2024 – Pkg Stats / Ryan Hefner

holidays-kr

v1.1.5

Published

data.go.kr 데이터 기반 공휴일 수집

Downloads

121

Readme

holidays-kr

NPM Version NPM Downloads License: MIT

Description

  • 공공데이터 포털 특일정보 데이터 기반으로 한국 공휴일 데이터 제공
  • 실제 휴일데이터를 받을 수 있습니다.
    • 선거일, 대체공휴일 같은 수기입력이 필요한 데이터도 전부 이용가능
  • API가 요청당 한달치 데이터만 주는 것을 원하는 범위만큼 한번에 긁을 수 있도록 하였습니다.
  • 한국천문연구원 측에서 수기로 입력한 데이터(대략 앞으로 1년치)만 노출되므로, 무한정 기간의 데이터를 받을 순 없습니다.

Installation

$ npm install holidays-kr

혹은

$ yarn add holidays-kr

Usage

import HolidaysKr from 'holidays-kr';

HolidaysKr.serviceKey = 'your-service-key'; // 디코딩된 서비스키를 사용해야 합니다.

const holidays = await HolidaysKr.getHolidays({
  year: 2023,   // 수집 시작 연도
  month: 5,     // 수집 시작 월
  monthCount: 3 // 수집 월 갯수
});

console.log(holidays);   // 2018.11 ~ 2019.8 데이터

타입과 파라미터

getHolidays는 다음과 같은 옵션을 받습니다.

| 옵션 | 설명 | |------|-----| | year | 가져오려는 공휴일의 년도 | | month | 가져오려는 공휴일의 월 | | monthCount | month로부터 몇 개월치 공휴일을 가져올지 (기본값은 1) |

반환 값은 다음과 같은 속성을 가진 객체의 배열입니다.

| 속성 | 설명 | |------|-----| | name | 공휴일의 이름 | | year | 공휴일의 년도 | | month | 공휴일의 월 | | day | 공휴일의 일 | | dateStr | 'YYYY-MM-DD' 형식의 날짜 문자열 |

License

MIT