stupig / calendar-converter Goto Github PK
View Code? Open in Web Editor NEW公农历互转组件( date converter between solar and lunar )
License: MIT License
公农历互转组件( date converter between solar and lunar )
License: MIT License
现在是0100。
公历2018年2月7日得到的cYear为 "戊戌",百度上查到为 “丁酉”。
代码如下:
JSON.stringify(new CalendarConverter().solar2lunar(new Date()))
信息为:
{
"sYear": 2018,
"sMonth": 2,
"sDay": 7,
"week": "三",
"lYear": 2017,
"lMonth": 12,
"lDay": 22,
"isLeap": false,
"cYear": "戊戌",-------------------------------这里不对
"cMonth": "甲寅",
"cDay": "庚午",
"lunarDay": "廿二",
"lunarMonth": "腊",
"lunarYear": "鸡",
"lunarFestival": "",
"solarFestival": "",
"solarTerms": ""
}
It seems the lib doesn't work for:
cc.lunar2solar(new Date(2013, 3, 13));
calElement {sYear: 2013, sMonth: 5, sDay: 22, week: "三", lYear: 2013…}
The correct result should be:
lunar: 2013, 3, 13 -> solar: 2013, 4, 22
lunar: 2013, 4, 13 -> solar: 2013, 5, 22
Please help to confirm and fix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.