Skip to content

loulin/lunar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lunar (beta)

公历与农历转换

Quick Examples

公历转农历

var lunar = require('lunar');

var date = lunar(new Date(2014, 9, 24));

console.log(date.toJSON());
console.log(date.toString()); // 农历甲午年闰九月初一

农历转公历

var lunar = require('lunar');

// 农历甲午年闰九月初一
var date = lunar([2014, 8, 1, true]);

console.log(date.toDate()); // Fri Oct 24 2014 00:00:00 GMT+0800 (CST)

About

公历与农历转换

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published