@kabeep/lunar-date-fns

lunar-date-fns

A JavaScript lunar date utility library

NodeJS License NPM Codecov Codacy Badge CircleCI

English | įŽ€äŊ“中文

Insights

This repository was created because my family's custom is to use the lunar calendar for birthdays, and many people can easily remember them except for me. I prefer the Gregorian calendar for birthdays.

Therefore, this package is currently mainly used for the mutual conversion between the Gregorian calendar and the lunar calendar. It will not output i18n, the Chinese zodiac, the 24 solar terms, the heavenly stems and .etc.

A lightweight, precise and zero-dependency utility library using Kim Larson's algorithm.

See documentation.

npm install @kabeep/lunar-date-fns --save
yarn add @kabeep/lunar-date-fns
pnpm add @kabeep/lunar-date-fns

CommonJS

const { toLunar, toSolar } = require('@kabeep/lunar-date-fns');

ESModule

import { toLunar, toSolar } from '@kabeep/lunar-date-fns';

Contributions via Pull Requests or Issues are welcome.

This project is licensed under the MIT License. See the LICENSE file for details.