@lich-nhu-y/lunar
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@lich-nhu-y/lunar

A JavaScript library for converting between solar and lunar dates, and for calculating the stems and branches of given dates.

Installation

npm install @lich-nhu-y/lunar
yarn add @lich-nhu-y/lunar

Usage

Importing the Library

import {
  solar2Lunar,
  lunar2Solar,
  getYearStem,
  getYearBranch,
  getYearStemBranch,
  getMonthStem,
  getMonthBranch,
  getMonthStemBranch,
  getDayStem,
  getDayBranch,
  getDayStemBranch,
  getHourStem,
  getHourBranch,
  getHourStemBranch,
  getDayType,
  getLunarDayInfo,
} from '@lich-nhu-y/lunar';
  • Parameters:

    • date: number | string - The solar date to convert.
    • format: moment.MomentFormatSpecification (optional) - The format of the input date.

License

This project is licensed under the MIT License.


Made with create-react-native-library

Package Sidebar

Install

npm i @lich-nhu-y/lunar

Weekly Downloads

14

Version

0.4.0

License

MIT

Unpacked Size

50.1 kB

Total Files

17

Last publish

Collaborators

  • huutq