{"_id":"korean-lunar-calendar","_rev":"8-aa0f801be525591e44a543083ddd300c","name":"korean-lunar-calendar","dist-tags":{"latest":"0.4.0"},"versions":{"0.3.2":{"name":"korean-lunar-calendar","version":"0.3.2","keywords":["korean","lunar","calendar"],"author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"license":"MIT","_id":"korean-lunar-calendar@0.3.2","maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"dist":{"shasum":"e74fc1a127a05ca310f97728ce832b268e928c53","tarball":"https://registry.npmjs.org/korean-lunar-calendar/-/korean-lunar-calendar-0.3.2.tgz","fileCount":8,"integrity":"sha512-q4tp3toAOtzJ0E+qQ9zpfkt83YgNnnbjJDCBvRtQP38CRRm0z7bRxtkcjorebPp7HrYuTu4qu4xM08tlDImFWg==","signatures":[{"sig":"MEUCIHAfat29qsjUTWaHaknroewlibi/3DK+fHBM+/94bBayAiEAhbBpWpmdOjjVPZgON7V+/pHWOnkRCCtJaJIcOI6sLF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOFcoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVPQ/+MPRaNdKeYsEx/GDF9oqHNAD8nTIfIwh5Er0I5W0IbS3lNFuW\r\nks/JDmyFwV7jLU20ytuPasNKm8x5rovkkf8cFsJsN/6IQ9qmeU38AvLLEDxR\r\nKXfkUX5R1Gwx0E9wccTaScP3dOAldOWihtyAaa/Rc37ZscIDe5EWVcbQGpr5\r\n3CnHcdbKCZ2A6hmfO6YomoqXNOB651yUyDkCExT4S6fT6dPyk87FUIIziAIc\r\nP0NIeVa9vthZQHjnb4DW7hVaIQ52281ymNG7YnEL8ZiyUYS8xjkT2HF2QaZ6\r\nMGFTg8uFCMue2bFVA6BkgOq4geDvJYHpSIgcwB24Ftv7BRvQF3lLJJY6HgpW\r\njgRyv6H+YE0ytb4L/wmh7gffsccSmA1WbrisR+dt+2eHy3bR6dN7tRTY+61q\r\nroddKfBJDBdYs3dgKMw+KK8AqjFkTqTeE0VvSekfl6w2Fm+1S7LQOrIuDDo6\r\n//QEERr7GZwyKM5IJxcl2T0zsbeWqfSe80fmzXB1T2KI2dZwzwvFOe0pbPw9\r\npVrT46M7ulKKMROGe9uq2ZHE1M9U5e/T1BI+L7QrjRy+5ahVdFlDo1YlSXdB\r\noacVwzOSXHbwenmhGtyyUjq27IdvfXNdVC7MgBEpa1sSpUnv8YbIJbKHuBsb\r\nRrLaRivSw79dTrf/0WCcNQgM+mtl/mPoetY=\r\n=NP1Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"jest","build":"npm run build:tsc","build:tsc":"tsc"},"_npmUser":{"name":"usingsky","email":"usingsky@gmail.com"},"repository":{"url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git","type":"git"},"_npmVersion":"8.19.2","description":"library to convert Korean lunar-calendar to Gregorian","directories":{},"_nodeVersion":"16.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","ts-jest":"^29.0.3","typescript":"^4.8.4","@types/jest":"^29.1.1"},"_npmOperationalInternal":{"tmp":"tmp/korean-lunar-calendar_0.3.2_1664636712357_0.4815480880616996","host":"s3://npm-registry-packages"}},"0.3.3":{"name":"korean-lunar-calendar","version":"0.3.3","keywords":["korean","lunar","calendar"],"author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"license":"MIT","_id":"korean-lunar-calendar@0.3.3","maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"dist":{"shasum":"8638993d7b5f6777d9663960abcec2f802b93b2f","tarball":"https://registry.npmjs.org/korean-lunar-calendar/-/korean-lunar-calendar-0.3.3.tgz","fileCount":10,"integrity":"sha512-QPtpgWxSIdC8USh7gs8FXY0XGNFnncWStkHnj3jI8eh1/YpPCBzSefwZmC68QxPhdvSeJlfUMzTkHEOuAr9osw==","signatures":[{"sig":"MEYCIQCp3wrNKoz87jkH1nOeDg4LY/2Q8Jdx1t2eNItDQ0XL9QIhAJl62Z1uv0/fQIUpT+f/WKttdHgyxRpSgzarosrpyd0a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":206973},"main":"dist/korean-lunar-calendar.js","types":"dist/korean-lunar-calendar.d.ts","module":"dist/esm/korean-lunar-calendar.js","engines":{"node":">= 16.14.0"},"exports":{".":{"types":"./dist/korean-lunar-calendar.d.ts","import":"./dist/esm/korean-lunar-calendar.js","require":"./dist/korean-lunar-calendar.js"}},"gitHead":"9bbdaafdb0f27a76bd74b0c8d1d24b44aea4d7f6","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && npm run bundle","clean":"rimraf --glob dist/* example/*.js","bundle":"rollup --config --bundleConfigAsCjs","compile":"tsc"},"_npmUser":{"name":"usingsky","email":"usingsky@gmail.com"},"repository":{"url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git","type":"git"},"_npmVersion":"9.7.2","description":"library to convert Korean lunar-calendar to Gregorian","directories":{},"sideEffects":false,"_nodeVersion":"16.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.1","eslint":"^8.44.0","rimraf":"^5.0.1","rollup":"^3.26.2","ts-jest":"^29.1.1","typescript":"~5.1.6","@types/jest":"^29.5.2","rollup-plugin-dts":"^5.3.0","rollup-plugin-copy":"^3.4.0","@rollup/plugin-commonjs":"^25.0.2","rollup-plugin-visualizer":"^5.9.2","@typescript-eslint/parser":"^5.61.0","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-minification":"^0.2.0","@rollup/plugin-node-resolve":"^15.1.0","@typescript-eslint/eslint-plugin":"^5.61.0"},"_npmOperationalInternal":{"tmp":"tmp/korean-lunar-calendar_0.3.3_1688740156303_0.2050661861573062","host":"s3://npm-registry-packages"}},"0.3.4":{"name":"korean-lunar-calendar","version":"0.3.4","keywords":["korean","lunar","calendar"],"author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"license":"MIT","_id":"korean-lunar-calendar@0.3.4","maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"dist":{"shasum":"02fa5f9b53c93f2c58f87ed3ed7e8f79da846081","tarball":"https://registry.npmjs.org/korean-lunar-calendar/-/korean-lunar-calendar-0.3.4.tgz","fileCount":9,"integrity":"sha512-Mlmt132BqWuHsxVZeKI9fqAjRW/2t8FcvUsFO5ecMulFVr1dK+hhiHP5zE9WUFpOxgxyHN8RJxewNMqmMmWKsg==","signatures":[{"sig":"MEQCICbEWv0yBrNDAFOikAvRf4QmROSXgs1BIIEfmYfGOy3KAiAlpNDDce4Df/x4rTb1JbFg22OSV22yPESUXfhHPouiFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188657},"main":"dist/korean-lunar-calendar.js","types":"dist/korean-lunar-calendar.d.ts","module":"dist/esm/korean-lunar-calendar.js","engines":{"node":">= 16.14.0"},"exports":{".":{"types":"./dist/korean-lunar-calendar.d.ts","import":"./dist/esm/korean-lunar-calendar.js","require":"./dist/korean-lunar-calendar.js"}},"gitHead":"9bbdaafdb0f27a76bd74b0c8d1d24b44aea4d7f6","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && npm run bundle","clean":"rimraf --glob dist/* example/*.js","bundle":"rollup --config --bundleConfigAsCjs","compile":"tsc"},"_npmUser":{"name":"usingsky","email":"usingsky@gmail.com"},"repository":{"url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git","type":"git"},"_npmVersion":"9.7.2","description":"library to convert Korean lunar-calendar to Gregorian","directories":{},"sideEffects":false,"_nodeVersion":"16.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.1","eslint":"^8.44.0","rimraf":"^5.0.1","rollup":"^3.26.2","ts-jest":"^29.1.1","typescript":"~5.1.6","@types/jest":"^29.5.2","rollup-plugin-dts":"^5.3.0","rollup-plugin-copy":"^3.4.0","@rollup/plugin-commonjs":"^25.0.2","rollup-plugin-visualizer":"^5.9.2","@typescript-eslint/parser":"^5.61.0","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-minification":"^0.2.0","@rollup/plugin-node-resolve":"^15.1.0","@typescript-eslint/eslint-plugin":"^5.61.0"},"_npmOperationalInternal":{"tmp":"tmp/korean-lunar-calendar_0.3.4_1688744254499_0.8868034282201673","host":"s3://npm-registry-packages"}},"0.3.5":{"name":"korean-lunar-calendar","version":"0.3.5","keywords":["korean","lunar","calendar"],"author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"license":"MIT","_id":"korean-lunar-calendar@0.3.5","maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"dist":{"shasum":"6a689a0aefd1be9da107dfc8447d6e08209b0fa4","tarball":"https://registry.npmjs.org/korean-lunar-calendar/-/korean-lunar-calendar-0.3.5.tgz","fileCount":9,"integrity":"sha512-qyC6Xg/FGV/61uAk62XZb4r892TOvNXqFY4JfPoftLgxSnwk5szizTuruZX+Wy/AOh0sYM/QwZS6pvnS3t3UJg==","signatures":[{"sig":"MEQCIH3T48XPB4SdQEVrKHePAEGErwWGgvmbYoXAmzQY9XxnAiAZ59Pw2WYsHXQUk0qbmFsMGM+txtNaybX7b1OW5RscHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188653},"main":"dist/korean-lunar-calendar.js","types":"dist/korean-lunar-calendar.d.ts","module":"dist/esm/korean-lunar-calendar.js","engines":{"node":">= 16.14.0"},"exports":{".":{"types":"./dist/korean-lunar-calendar.d.ts","module":"./dist/esm/korean-lunar-calendar.js","default":"./dist/korean-lunar-calendar.js"}},"gitHead":"d2bc7ce54445e532a357321529251baea89410ba","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && npm run bundle","clean":"rimraf --glob dist/* example/*.js","bundle":"rollup --config --bundleConfigAsCjs","compile":"tsc"},"_npmUser":{"name":"usingsky","email":"usingsky@gmail.com"},"repository":{"url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git","type":"git"},"_npmVersion":"9.7.2","description":"library to convert Korean lunar-calendar to Gregorian","directories":{},"sideEffects":false,"_nodeVersion":"16.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.1","eslint":"^8.44.0","rimraf":"^5.0.1","rollup":"^3.26.2","ts-jest":"^29.1.1","typescript":"~5.1.6","@types/jest":"^29.5.2","rollup-plugin-dts":"^5.3.0","rollup-plugin-copy":"^3.4.0","@rollup/plugin-commonjs":"^25.0.2","rollup-plugin-visualizer":"^5.9.2","@typescript-eslint/parser":"^5.61.0","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-minification":"^0.2.0","@rollup/plugin-node-resolve":"^15.1.0","@typescript-eslint/eslint-plugin":"^5.61.0"},"_npmOperationalInternal":{"tmp":"tmp/korean-lunar-calendar_0.3.5_1688747334044_0.7456993085313661","host":"s3://npm-registry-packages"}},"0.3.6":{"name":"korean-lunar-calendar","version":"0.3.6","keywords":["korean","lunar","solar","calendar","한국","음력","양력","달력"],"author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"license":"MIT","_id":"korean-lunar-calendar@0.3.6","maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"dist":{"shasum":"d8efe2f741bcfccd80143b3ed3dbf72a0771f7ab","tarball":"https://registry.npmjs.org/korean-lunar-calendar/-/korean-lunar-calendar-0.3.6.tgz","fileCount":9,"integrity":"sha512-9jpZUH8ph6GsBgIGy8al6z6OfG6TdSIDB99Zj73B35ohtG12EFj3CGE5NzjBsXFiJUUjEr08/XCjfh+flXZVPw==","signatures":[{"sig":"MEYCIQDik04lUmRaJ3Ss1ML58ZyxRuepKiqKIr3BTBuLDFzhpgIhANAqbVcIgHLz0pG2t0Yml7YDWSDNNTkAZe1OP13x8b//","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":186131},"main":"dist/korean-lunar-calendar.js","types":"dist/korean-lunar-calendar.d.ts","module":"dist/esm/korean-lunar-calendar.js","engines":{"node":">= 16.14.0"},"exports":{".":{"types":"./dist/korean-lunar-calendar.d.ts","module":"./dist/esm/korean-lunar-calendar.js","default":"./dist/korean-lunar-calendar.js"}},"gitHead":"3202f2fb159cffeed0bd68ab059733b6c63fc818","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && npm run bundle","clean":"rimraf --glob dist/* example/*.js","bundle":"rollup --config --bundleConfigAsCjs","compile":"tsc"},"_npmUser":{"name":"usingsky","email":"usingsky@gmail.com"},"repository":{"url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git","type":"git"},"_npmVersion":"9.8.1","description":"library to convert Korean lunar-calendar to Gregorian","directories":{},"sideEffects":false,"_nodeVersion":"16.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.1","eslint":"^8.45.0","rimraf":"^5.0.1","rollup":"^3.26.3","ts-jest":"^29.1.1","typescript":"~5.1.6","@types/jest":"^29.5.3","rollup-plugin-dts":"^5.3.0","rollup-plugin-copy":"^3.4.0","@rollup/plugin-commonjs":"^25.0.3","rollup-plugin-visualizer":"^5.9.2","@typescript-eslint/parser":"^6.2.0","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-minification":"^0.2.0","@rollup/plugin-node-resolve":"^15.1.0","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/korean-lunar-calendar_0.3.6_1690291667339_0.1569129657267514","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"korean-lunar-calendar","version":"0.4.0","description":"library to convert Korean lunar-calendar to Gregorian","keywords":["calendar","korean","lunar","solar","달력","양력","음력","한국"],"homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"license":"MIT","author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git"},"sideEffects":false,"main":"./dist/korean-lunar-calendar.js","module":"./dist/korean-lunar-calendar.mjs","types":"./dist/index.d.ts","unpkg":"./dist/korean-lunar-calendar.min.js","jsdelivr":"./dist/korean-lunar-calendar.min.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/korean-lunar-calendar.mjs","require":"./dist/korean-lunar-calendar.js"},"./package.json":"./package.json"},"scripts":{"clean":"rimraf dist","build":"npm run clean && vite build && vite build --config vite.config.browser.ts","typecheck":"tsc --noEmit","lint":"oxlint","lint:fix":"oxlint --fix","format":"oxfmt --write","format:check":"oxfmt --check","check":"oxlint && oxfmt --check && tsc --noEmit","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build"},"devDependencies":{"@microsoft/api-extractor":"^7.58.8","@types/node":"^24.0.0","oxfmt":"^0.54.0","oxlint":"^1.69.0","rimraf":"^5.0.1","typescript":"~6.0.3","vite":"^8.0.16","vite-plugin-dts":"^5.0.2","vitest":"^4.1.8"},"engines":{"node":">= 16.14.0"},"gitHead":"7764086911b26e41d40f8dba80673b076c064cc2","_id":"korean-lunar-calendar@0.4.0","_nodeVersion":"24.14.1","_npmVersion":"11.14.0","dist":{"integrity":"sha512-kJXyH3sI/butJxCBtsLXlMJsl5qqNKNjduf1Na0s7XXwP+D/Wdlx0R0/S5ygxPVFSXf/JZ3bBKaCP6bGWhgZ0w==","shasum":"9be00ef21e60f969e4bfc7957da70ec92e2c8a0d","tarball":"https://registry.npmjs.org/korean-lunar-calendar/-/korean-lunar-calendar-0.4.0.tgz","fileCount":10,"unpackedSize":202738,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCCW/F0UcsJf591cqh/kOPA8NQjTPOHokBMjUjalq7VRgIga+XfgW52o1jegVz4Ca9IgXMGRXrDDsTUVtXm12abqrI="}]},"_npmUser":{"name":"usingsky","email":"usingsky@gmail.com"},"directories":{},"maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/korean-lunar-calendar_0.4.0_1781529821590_0.07370690036182559"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-01T15:05:12.357Z","modified":"2026-06-15T13:23:41.862Z","0.3.1":"2022-09-30T13:48:49.234Z","0.3.2":"2022-10-01T15:05:12.518Z","0.3.3":"2023-07-07T14:29:16.540Z","0.3.4":"2023-07-07T15:37:34.653Z","0.3.5":"2023-07-07T16:28:54.243Z","0.3.6":"2023-07-25T13:27:47.539Z","0.4.0":"2026-06-15T13:23:41.750Z"},"bugs":{"url":"https://github.com/usingsky/korean_lunar_calendar_js/issues"},"author":{"name":"Jinil Lee","email":"usingsky@gmail.com"},"license":"MIT","homepage":"https://github.com/usingsky/korean_lunar_calendar_js#readme","keywords":["calendar","korean","lunar","solar","달력","양력","음력","한국"],"repository":{"type":"git","url":"git+https://github.com/usingsky/korean_lunar_calendar_js.git"},"description":"library to convert Korean lunar-calendar to Gregorian","maintainers":[{"name":"usingsky","email":"usingsky@gmail.com"}],"readme":"<h1 align=\"center\">korean-lunar-calendar</h1>\n\n<p align=\"center\">\n  Convert between the <strong>Korean lunar calendar</strong> (음력) and the\n  <strong>Gregorian solar calendar</strong> (양력) — entirely offline, following the\n  <a href=\"https://astro.kasi.re.kr/\">KARI</a> (Korea Astronomy and Space Science Institute) standard.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/korean-lunar-calendar\"><img src=\"https://img.shields.io/npm/v/korean-lunar-calendar.svg\" alt=\"npm version\" /></a>\n  <img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT license\" />\n  <img src=\"https://img.shields.io/badge/types-included-blue.svg\" alt=\"TypeScript types included\" />\n  <img src=\"https://img.shields.io/badge/deps-zero-success.svg\" alt=\"Zero dependencies\" />\n  <a href=\"https://usingsky.github.io/korean_lunar_calendar_js\"><img src=\"https://img.shields.io/badge/demo-live-success.svg\" alt=\"Live demo\" /></a>\n</p>\n\n<p align=\"center\"><strong><a href=\"https://usingsky.github.io/korean_lunar_calendar_js\">▶ Try the live demo</a></strong> — convert dates in your browser.</p>\n\n> The Korean and Chinese lunar calendars share the same astronomical basis but can fall on\n> different dates. This library uses the Korean (KARI) standard.\n\n## Features\n\n- **Two-way conversion** — solar → lunar and lunar → solar, in one small class.\n- **Offline** — the conversion table is bundled; no network calls, no external services.\n- **GapJa (간지) strings** — get the sexagenary year/month/day in both Korean (정유년 병오월) and Chinese (丁酉年 丙午月), plus raw cheongan/ganji indices.\n- **Leap-month aware** — handles intercalation months (윤달) and the 1582 Gregorian reform gap.\n- **Input validation** — every setter returns a `boolean`; out-of-range, non-integer, and impossible-leap-month dates are rejected.\n- **Typed & dual-format** — ships TypeScript types, ESM + CommonJS, plus a minified browser build.\n- **Zero runtime dependencies.**\n\n## Supported range\n\n| Calendar          | From         | To           |\n| ----------------- | ------------ | ------------ |\n| Lunar (음력)       | `1000-01-01` | `2050-11-18` |\n| Solar (양력)       | `1000-02-13` | `2050-12-31` |\n\nDates outside this range cause the corresponding setter to return `false`.\n\n## Install\n\n```bash\nnpm install korean-lunar-calendar\n```\n\n```js\n// ES Modules\nimport KoreanLunarCalendar from \"korean-lunar-calendar\";\n\n// CommonJS\nconst KoreanLunarCalendar = require(\"korean-lunar-calendar\");\n```\n\n```html\n<!-- Browser (CDN) -->\n<script src=\"https://cdn.jsdelivr.net/npm/korean-lunar-calendar/dist/korean-lunar-calendar.min.js\"></script>\n```\n\n## Usage\n\n### Solar → Lunar (양력 → 음력)\n\n```js\nconst calendar = new KoreanLunarCalendar();\n\n// setSolarDate(year, month, day) → boolean (false if invalid/out of range)\ncalendar.setSolarDate(2017, 6, 24);\n\ncalendar.getLunarCalendar();\n// { year: 2017, month: 5, day: 1, intercalation: true }\n\ncalendar.getKoreanGapja();\n// { year: \"정유년\", month: \"병오월\", day: \"임오일\", intercalation: \"윤월\" }\n\ncalendar.getChineseGapja();\n// { year: \"丁酉年\", month: \"丙午月\", day: \"壬午日\", intercalation: \"閏月\" }\n```\n\n### Lunar → Solar (음력 → 양력)\n\n```js\nconst calendar = new KoreanLunarCalendar();\n\n// setLunarDate(year, month, day, intercalation) → boolean\ncalendar.setLunarDate(1956, 1, 21, false);\n\ncalendar.getSolarCalendar();\n// { year: 1956, month: 3, day: 3 }\n\ncalendar.getKoreanGapja();\n// { year: \"병신년\", month: \"경인월\", day: \"기사일\", intercalation: \"\" }\n```\n\n> Always check the return value of `setSolarDate` / `setLunarDate` before reading the result —\n> the getters reflect the **last successful** set call.\n\n## API\n\n`new KoreanLunarCalendar()` creates a stateful converter. Set a date, then read it back in the\nother calendar.\n\n| Method | Returns | Description |\n| ------ | ------- | ----------- |\n| `setSolarDate(year, month, day)` | `boolean` | Set a Gregorian date. Returns `false` for out-of-range, non-integer, or nonexistent dates. |\n| `setLunarDate(year, month, day, intercalation)` | `boolean` | Set a lunar date. `intercalation` requests the leap month; returns `false` if that month has no leap month. |\n| `getSolarCalendar()` | `CalendarData` | The solar date for the last successful set. |\n| `getLunarCalendar()` | `CalendarData` | The lunar date (includes `intercalation`). |\n| `getKoreanGapja()` | `GapJaData` | Sexagenary cycle in Korean (e.g. `정유년`). |\n| `getChineseGapja()` | `GapJaData` | Sexagenary cycle in Chinese characters (e.g. `丁酉年`). |\n| `getGapja(isChinese?)` | `GapJaData` | GapJa in Korean by default, Chinese when `isChinese` is `true`. |\n| `getGapJaIndex()` | `{ cheongan, ganji }` | Raw 0-based cheongan (천간) and ganji (지지) indices for year/month/day. |\n\n### Types\n\n```ts\ninterface CalendarData {\n  year: number;\n  month: number;\n  day: number;\n  intercalation?: boolean; // present on lunar results\n}\n\ninterface GapJaData {\n  year: string;\n  month: string;\n  day: string;\n  intercalation?: string; // \"윤월\" / \"閏月\" when the lunar month is a leap month, else \"\"\n}\n```\n\n> `getSolarCalendar()` and `getLunarCalendar()` return a **copy** — mutating the returned object\n> does not affect the converter's internal state.\n\n## Validation\n\nEvery setter validates its input and returns a `boolean`, so you can branch on the result:\n\n```js\nconst calendar = new KoreanLunarCalendar();\n\n// Rejected → return false\ncalendar.setLunarDate(99, 1, 1, false);   // before supported range\ncalendar.setSolarDate(2051, 1, 1);        // after supported range\ncalendar.setSolarDate(2017, 6, 24.5);     // non-integer day\ncalendar.setSolarDate(1582, 10, 8);       // skipped by the 1582 Gregorian reform\ncalendar.setLunarDate(2017, 3, 1, true);  // month 3 of 2017 has no leap month\n\n// Accepted → return true\ncalendar.setLunarDate(1000, 1, 1, false);\ncalendar.setSolarDate(2050, 12, 31);\n```\n\n## Other languages\n\nThe same library is available for other ecosystems:\n\n- **Java** — [usingsky/KoreanLunarCalendar](https://github.com/usingsky/KoreanLunarCalendar)\n- **Python** — [usingsky/korean_lunar_calendar_py](https://github.com/usingsky/korean_lunar_calendar_py)\n- **JavaScript** — [usingsky/korean_lunar_calendar_js](https://github.com/usingsky/korean_lunar_calendar_js)\n\n## Acknowledgements\n\nConversion data follows the [KARI (Korea Astronomy and Space Science Institute)](https://astro.kasi.re.kr/)\nKorean lunar–solar standard. Many thanks to KARI for publishing the reference tables.\n\n## License\n\nMIT © [Jinil Lee](https://github.com/usingsky)\n","readmeFilename":"README.md"}