cky-lunar-calendar
Features!
- Convert solar date with timezone to lunar date
- And revert lunar date to solar date
This package use lib of Ho Ngoc Duc, convert a date to lunar date with timezone (default timezone is GMT+7)
Copyright 2004 Ho Ngoc Duc (Am lich - Ho Ngoc Duc). All Rights Reserved. Permission to use, copy, modify, and redistribute this software and its documentation for personal, non-commercial use is hereby granted provided that this copyright notice appears in all copies.
Installation
$ npm install cky-lunar-calendar --save
function
- solar2Lunar (date, month, yeaer, timezone)
- return Array [date, month, year]
convert solar date to lunar date with timezone optional.
- lunar2Solar (date, month, yeaer, timezone)
- return
Array [date, month, year]
convert lunar date to solar date with timezone optional.
Test script
const lunar = ; let now = ; let dateLunar = lunar;console; let dateSolar = lunar;console;
Test command
$ npm test
will output like:
Solar -> Lunar: 3/6/2019 -> 1 5 2019
Lunar -> Solar: 3/6/2019 -> 5 7 2019
License
MIT