Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

显示节日农历festival的时候,部分节日日期显示错误 #76

Open
zhuwenqi001 opened this issue May 22, 2018 · 1 comment
Open

Comments

@zhuwenqi001
Copy link

初始化代码是:
jeDate("#test12",{ format: "YYYY-MM-DD", name: "cn", festival: true, checkschedual: "date" });

在展示结果中 母亲节、父亲节日期显示错误
image

@gerryli0214
Copy link

母亲节 && 父亲节应该是动态计算的 源码中式固定写死的,现在的解决方法是去除sFtv1中母亲节&&父亲节数据,转而进行动态计算,源码中代码如下:
sFtv1 = { "0101": "*1元旦节", "0202": "湿地日", "0214": "情人节", "0308": "妇女节", "0312": "植树节", "0315": "消费者权益日", "0401": "愚人节", "0422": "地球日", "0501": "*1劳动节", "0504": "青年节", "0512": "护士节", "0518": "博物馆日", "0601": "儿童节", "0623": "奥林匹克日", "0701": "建党节", "0801": "建军节", "0903": "抗战胜利日", "0910": "教师节", "1001": "*3国庆节", "1201": "艾滋病日", "1224": "平安夜", "1225": "圣诞节" }; //母亲节 五月的第二个星期日 var curYear = new Date().getFullYear(); var mayFirst = new Date(curYear + '-05-01').getDay(); var mothersDay = 14 - mayFirst + 1; sFtv1['05' + mothersDay] = '母亲节'; //父亲节 六月的第三个星期日 var juneFirst = new Date(curYear + '-06-01').getDay(); var fathersDay = 21 - juneFirst + 1; sFtv1['06' + fathersDay] = '父亲节';
方法名:jeLunar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants