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

@publicdata/lunar-solar

v1.2.0

Published

공공데이터포털 - (천문우주정보)음력일정보, 양력일정보, 특정음력일정보, 율리우스적일정보를 조회

Downloads

160

Readme

publicdata-lunar-solar

공공데이터포털 - (천문우주정보)음력일정보, 양력일정보, 특정음력일정보, 율리우스적일정보를 조회

npm install @publicdata/lunar-solar

API KEY 이 키는 사용 횟수에 제한이 있습니다. 다른 사용자들을 위하여, 평가 및 테스트 용도로 만 사용해주세요. 운영 용도로 사용하실때는 아래 링크에서 발급 받으시기 바랍니다. 키를 입력하지 않으면, 내부의 평가용 키가 사용됩니다.

This key has a limit on the number of uses. For other users, please use it only for evaluation and testing purposes. When you use it for operational purposes, please issue it at the link below. If you do not enter a key, the internal evaluation key is used.

https://www.data.go.kr/data/15012679/openapi.do

const calendar = require('@publicdata/lunar-solar');
// API KEY
const apiKey = 'FrfJ9dHacz+F1C/eZu2y6H3/IkpYoXks9WESSb89+tGAKHSCoEPkVjMMbYpaklLevH92hAsOX/0RjxXiU8BTiw==';
let bOk = false;

1. solar to lunar

bOk = calendar.toLunar('2021', '06', '20', function(json){
    if (bOk) {
        console.log(json);
    }
}, apiKey);

console.log

toLunar(2021, 06, 20)
{
  lunDay: 11,
  lunIljin: '기해(己亥)',
  lunLeapmonth: '평',
  lunMonth: 5,
  lunNday: 30,
  lunSecha: '신축(辛丑)',
  lunWolgeon: '갑오(甲午)',
  lunYear: 2021,
  solDay: 20,
  solJd: 2459386,
  solLeapyear: '평',
  solMonth: 6,
  solWeek: '일',
  solYear: 2021
}

2. lunar to solar

bOk = calendar.toSolar('2021', '06', '20', function(json){
    if (bOk) {
        console.log(json);
    }
}, apiKey);

console.log

toSolar(2021, 06, 20)
{
    lunDay: 20,
    lunIljin: '무인(戊寅)',
    lunLeapmonth: '평',
    lunMonth: 6,
    lunNday: 29,
    lunSecha: '신축(辛丑)',
    lunWolgeon: '을미(乙未)',
    lunYear: 2021,
    solDay: 29,
    solJd: 2459425,
    solLeapyear: '평',
    solMonth: 7,
    solWeek: '목',
    solYear: 2021
}

3. specified lunar date.

bOk = calendar.toSolars('2020', '2022', '06', '20', false, function(json){
    if (bOk) {
        console.log(json);
    }
}, apiKey);

console.log

toSolars(2020, 2022, 06, 20, false)
{
  item: [
    {
      lunDay: 20,
      lunIljin: '갑신(甲申)',
      lunLeapmonth: '평',
      lunMonth: 6,
      lunNday: 20,
      lunSecha: '경자(庚子)',
      lunWolgeon: '계미(癸未)',
      lunYear: 2020,
      solDay: 9,
      solJd: 2459071,
      solLeapyear: '윤',
      solMonth: 8,
      solWeek: '일',
      solYear: 2020
    },
    {
      lunDay: 20,
      lunIljin: '무인(戊寅)',
      lunLeapmonth: '평',
      lunMonth: 6,
      lunNday: 20,
      lunSecha: '신축(辛丑)',
      lunWolgeon: '을미(乙未)',
      lunYear: 2021,
      solDay: 29,
      solJd: 2459425,
      solLeapyear: '평',
      solMonth: 7,
      solWeek: '목',
      solYear: 2021
    },
    {
      lunDay: 20,
      lunIljin: '임신(壬申)',
      lunLeapmonth: '평',
      lunMonth: 6,
      lunNday: 20,
      lunSecha: '임인(壬寅)',
      lunWolgeon: '정미(丁未)',
      lunYear: 2022,
      solDay: 18,
      solJd: 2459779,
      solLeapyear: '평',
      solMonth: 7,
      solWeek: '월',
      solYear: 2022
    }
  ]
}

4. julius date.

bOk = calendar.toJulius('2229156', function(json){
    if (bOk) {
        console.log(json);
    }
}, apiKey);

console.log

toJulius(2229156)
{
  lunDay: 1,
  lunIljin: '기축(己丑)',
  lunLeapmonth: '평',
  lunMonth: 1,
  lunNday: 29,
  lunSecha: '신미(辛未)',
  lunWolgeon: '경인(庚寅)',
  lunYear: 1391,
  solDay: 5,
  solJd: 2229156,
  solLeapyear: '평',
  solMonth: 2,
  solWeek: '일',
  solYear: 1391
}

5. solar to lunar async

item = calendar.toLunarAsync('2021', '06', '20', apiKey);
if (item) {
  console.log(item);
}

console.log

toLunarAsync(2021, 06, 20)
{
  lunDay: 11,
  lunIljin: '기해(己亥)',
  lunLeapmonth: '평',
  lunMonth: 5,
  lunNday: 30,
  lunSecha: '신축(辛丑)',
  lunWolgeon: '갑오(甲午)',
  lunYear: 2021,
  solDay: 20,
  solJd: 2459386,
  solLeapyear: '평',
  solMonth: 6,
  solWeek: '일',
  solYear: 2021
}

6. lunar to solar async

item = calendar.toSolarAsync('2021', '06', '20', apiKey);
if (item) {
  console.log(item);
}

console.log

toSolarAsync(2021, 06, 20)
{
  lunDay: 20,
  lunIljin: '무인(戊寅)',
  lunLeapmonth: '평',
  lunMonth: 6,
  lunNday: 29,
  lunSecha: '신축(辛丑)',
  lunWolgeon: '을미(乙未)',
  lunYear: 2021,
  solDay: 29,
  solJd: 2459425,
  solLeapyear: '평',
  solMonth: 7,
  solWeek: '목',
  solYear: 2021
}

7. specified lunar date async

item = calendar.toSolarsAsync('2020', '2022', '06', '20', false, apiKey);
if (item) {
  console.log(item);
}

console.log

toSolarsAsync(2020, 2022, 06, 20, false)
{
  item: [
    {
      lunDay: 20,
      lunIljin: '갑신(甲申)',
      lunLeapmonth: '평',
      lunMonth: 6,
      lunNday: 20,
      lunSecha: '경자(庚子)',
      lunWolgeon: '계미(癸未)',
      lunYear: 2020,
      solDay: 9,
      solJd: 2459071,
      solLeapyear: '윤',
      solMonth: 8,
      solWeek: '일',
      solYear: 2020
    },
    {
      lunDay: 20,
      lunIljin: '무인(戊寅)',
      lunLeapmonth: '평',
      lunMonth: 6,
      lunNday: 20,
      lunSecha: '신축(辛丑)',
      lunWolgeon: '을미(乙未)',
      lunYear: 2021,
      solDay: 29,
      solJd: 2459425,
      solLeapyear: '평',
      solMonth: 7,
      solWeek: '목',
      solYear: 2021
    },
    {
      lunDay: 20,
      lunIljin: '임신(壬申)',
      lunLeapmonth: '평',
      lunMonth: 6,
      lunNday: 20,
      lunSecha: '임인(壬寅)',
      lunWolgeon: '정미(丁未)',
      lunYear: 2022,
      solDay: 18,
      solJd: 2459779,
      solLeapyear: '평',
      solMonth: 7,
      solWeek: '월',
      solYear: 2022
    }
  ]
}

8. julius date async

item = calendar.toJuliusAsync('2229156', apiKey);
if (item) {
  console.log(item);
}

console.log

toJuliusAsync('2229156')
{
  lunDay: 1,
  lunIljin: '기축(己丑)',
  lunLeapmonth: '평',
  lunMonth: 1,
  lunNday: 29,
  lunSecha: '신미(辛未)',
  lunWolgeon: '경인(庚寅)',
  lunYear: 1391,
  solDay: 5,
  solJd: 2229156,
  solLeapyear: '평',
  solMonth: 2,
  solWeek: '일',
  solYear: 1391
}