0.0.3 • Published 8 years ago

ilunar v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

ilunar

:crescent_moon: 阴历 <=> :sunny: 阳历 转换工具,支持(1900, 2100)年区间。

Install

nom install --save ilunar

Usage

import Lunar from 'ilunar';

const lunar = new Lunar();

console.log(lunar.getYear());
console.log(lunar.getMonth());
console.log(lunar.getDate());

console.log(Lunar.solar2Lunar(new Date('2015-02-28')));
console.log(Lunar.lunar2Solar({year: 2015, month: 10, date: 28}));

Debug

# `npm install babel-cli -g` first
babel-node test/debug.js

License

MIT