1
0
mirror of synced 2026-04-16 21:38:40 +08:00

Compare commits

..

8 Commits

6 changed files with 385 additions and 106 deletions

View File

@@ -415,12 +415,12 @@ test('test022', () => {
test('test023', () => {
const lunar = Lunar.fromYmd(2022, 1, 1);
expect(lunar.getYearNineStar().toString()).toBe('五黄土玉衡');
expect(lunar.getYearNineStar().toString()).toBe('六白金开阳');
});
test('test024', () => {
const lunar = Lunar.fromYmd(2033, 1, 1);
expect(lunar.getYearNineStar().toString()).toBe('三碧木天');
expect(lunar.getYearNineStar().toString()).toBe('四绿木天');
});
test('test025', () => {

View File

@@ -19,3 +19,21 @@ test('testFromSunday', () => {
expect(week.getFirstDay().toString()).toBe('2019-04-28');
expect(week.getFirstDayInMonth().toString()).toBe('2019-05-01');
});
test('test1', () => {
const start = 0;
const week = SolarWeek.fromYmd(2022, 5, 1, start);
expect(week.getIndex()).toBe(1);
});
test('test2', () => {
const start = 2;
const week = SolarWeek.fromYmd(2021, 5, 4, start);
expect(week.getIndex()).toBe(2);
});
test('test3', () => {
const start = 0;
const week = SolarWeek.fromYmd(2022, 3, 6, start);
expect(week.getIndexInYear()).toBe(11);
});

View File

@@ -77,3 +77,9 @@ test('test13', () => {
const lunar = solar.getLunar();
expect(lunar.getHou()).toBe('小寒 初候');
});
test('test14', () => {
const solar = Solar.fromYmd(2022,5,20);
const lunar = solar.getLunar();
expect(lunar.getHou()).toBe('立夏 三候');
});

View File

@@ -31,3 +31,30 @@ it('test3', () => {
expect(yun.getStartDay()).toBe(0);
expect(yun.getStartSolar().toYmd()).toBe('2020-02-06');
});
it('test4', () => {
const solar = Solar.fromYmdHms(2022, 3, 9, 20, 51, 0);
const lunar = solar.getLunar();
const eightChar = lunar.getEightChar();
const yun = eightChar.getYun(1);
expect(yun.getStartSolar().toYmd()).toBe('2030-12-19');
});
it('test5', () => {
const solar = Solar.fromYmdHms(2022, 3, 9, 20, 51, 0);
const lunar = solar.getLunar();
const eightChar = lunar.getEightChar();
const yun = eightChar.getYun(1, 2);
expect(yun.getStartYear()).toBe(8);
expect(yun.getStartMonth()).toBe(9);
expect(yun.getStartDay()).toBe(2);
expect(yun.getStartSolar().toYmd()).toBe('2030-12-12');
});
it('test6', () => {
const solar = Solar.fromYmdHms(2018, 6, 11, 9, 30, 0);
const lunar = solar.getLunar();
const eightChar = lunar.getEightChar();
const yun = eightChar.getYun(0, 2);
expect(yun.getStartSolar().toYmd()).toBe('2020-03-21');
});

434
lunar.js
View File

@@ -770,9 +770,9 @@
getTimePositionCaiDesc:function(){
return LunarUtil.POSITION_DESC[this.getTimePositionCai()];
},
getDayPositionTaiSui:function(){
_getDayPositionTaiSui:function(dayInGanZhi, yearZhiIndex){
var p = '';
switch (this.getDayInGanZhi()) {
switch (dayInGanZhi) {
case '甲子':
case '乙丑':
case '丙寅':
@@ -814,12 +814,91 @@
p = '坎';
break;
default:
p = LunarYear.fromYear(this.getYear()).getPositionTaiSui();
p = LunarUtil.POSITION_TAI_SUI_YEAR[yearZhiIndex];
}
return p;
},
getDayPositionTaiSuiDesc:function(){
return LunarUtil.POSITION_DESC[this.getDayPositionTaiSui()];
getDayPositionTaiSui:function(sect){
var dayInGanZhi;
var yearZhiIndex;
switch (sect) {
case 1:
dayInGanZhi = this.getDayInGanZhi();
yearZhiIndex = this._p.yearZhiIndex;
break;
case 3:
dayInGanZhi = this.getDayInGanZhi();
yearZhiIndex = this._p.yearZhiIndexExact;
break;
default:
dayInGanZhi = this.getDayInGanZhiExact2();
yearZhiIndex = this._p.yearZhiIndexByLiChun;
}
return this._getDayPositionTaiSui(dayInGanZhi, yearZhiIndex);
},
getDayPositionTaiSuiDesc:function(sect){
return LunarUtil.POSITION_DESC[this.getDayPositionTaiSui(sect)];
},
_getMonthPositionTaiSui:function(monthZhiIndex, monthGanIndex){
var p = '';
var m = monthZhiIndex - LunarUtil.BASE_MONTH_ZHI_INDEX;
if (m < 0) {
m += 12;
}
switch(m) {
case 0:
case 4:
case 8:
p = '艮';
break;
case 2:
case 6:
case 10:
p = '坤';
break;
case 3:
case 7:
case 11:
p = '巽';
break;
default:
p = LunarUtil.POSITION_GAN[monthGanIndex];
}
return p;
},
getMonthPositionTaiSui:function(sect){
var monthZhiIndex;
var monthGanIndex;
switch (sect) {
case 3:
monthZhiIndex = this._p.monthZhiIndexExact;
monthGanIndex = this._p.monthGanIndexExact;
break;
default:
monthZhiIndex = this._p.monthZhiIndex;
monthGanIndex = this._p.monthGanIndex;
}
return this._getMonthPositionTaiSui(monthZhiIndex, monthGanIndex);
},
getMonthPositionTaiSuiDesc:function(sect){
return LunarUtil.POSITION_DESC[this.getMonthPositionTaiSui(sect)];
},
getYearPositionTaiSui:function(sect){
var yearZhiIndex;
switch (sect) {
case 1:
yearZhiIndex = this._p.yearZhiIndex;
break;
case 3:
yearZhiIndex = this._p.yearZhiIndexExact;
break;
default:
yearZhiIndex = this._p.yearZhiIndexByLiChun;
}
return LunarUtil.POSITION_TAI_SUI_YEAR[yearZhiIndex];
},
getYearPositionTaiSuiDesc:function(sect){
return LunarUtil.POSITION_DESC[this.getYearPositionTaiSui(sect)];
},
getChong:function(){
return this.getDayChong();
@@ -904,59 +983,51 @@
},
_convertJieQi:function(name){
var jq = name;
if('DONG_ZHI'===jq){
if('DONG_ZHI' === jq){
jq = '冬至';
}else if('DA_HAN'===jq){
}else if('DA_HAN' === jq){
jq = '大寒';
}else if('XIAO_HAN'===jq){
}else if('XIAO_HAN' === jq){
jq = '小寒';
}else if('LI_CHUN'===jq){
}else if('LI_CHUN' === jq){
jq = '立春';
}else if('DA_XUE'===jq){
}else if('DA_XUE' === jq){
jq = '大雪';
}else if('YU_SHUI'===jq){
}else if('YU_SHUI' === jq){
jq = '雨水';
}else if('JING_ZHE'===jq){
}else if('JING_ZHE' === jq){
jq = '惊蛰';
}
return jq;
},
getJie:function(){
var d;
var jie='';
for(var i=0,j=Lunar.JIE_QI_IN_USE.length;i<j;i+=2){
for(var i=0, j=Lunar.JIE_QI_IN_USE.length; i<j; i+=2){
var key = Lunar.JIE_QI_IN_USE[i];
d = this._p.jieQi[key];
if(d.getYear()===this._p.solar.getYear()&&d.getMonth()===this._p.solar.getMonth()&&d.getDay()===this._p.solar.getDay()){
jie=key;
break;
var d = this._p.jieQi[key];
if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){
return this._convertJieQi(key);
}
}
return this._convertJieQi(jie);
return '';
},
getQi:function(){
var d;
var qi='';
for(var i=1,j=Lunar.JIE_QI_IN_USE.length;i<j;i+=2){
for(var i=1, j=Lunar.JIE_QI_IN_USE.length; i<j; i+=2){
var key = Lunar.JIE_QI_IN_USE[i];
d = this._p.jieQi[key];
if(d.getYear()===this._p.solar.getYear()&&d.getMonth()===this._p.solar.getMonth()&&d.getDay()===this._p.solar.getDay()){
qi=key;
break;
var d = this._p.jieQi[key];
if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){
return this._convertJieQi(key);
}
}
return this._convertJieQi(qi);
return '';
},
getJieQi:function(){
var name = '';
for(var key in this._p.jieQi){
var d = this._p.jieQi[key];
if(d.getYear()==this._p.solar.getYear()&&d.getMonth()==this._p.solar.getMonth()&&d.getDay()==this._p.solar.getDay()){
name = key;
break;
if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){
return this._convertJieQi(key);
}
}
return this._convertJieQi(name);
return '';
},
getWeek:function(){
return this._p.weekIndex;
@@ -1103,11 +1174,11 @@
}
return LunarUtil.POSITION_TAI_MONTH[m-1];
},
getDayYi:function(){
return LunarUtil.getDayYi(this.getMonthInGanZhiExact(),this.getDayInGanZhi());
getDayYi:function(sect){
return LunarUtil.getDayYi(2 == sect ? this.getMonthInGanZhiExact() : this.getMonthInGanZhi(), this.getDayInGanZhi());
},
getDayJi:function(){
return LunarUtil.getDayJi(this.getMonthInGanZhiExact(),this.getDayInGanZhi());
getDayJi:function(sect){
return LunarUtil.getDayJi(2 == sect ? this.getMonthInGanZhiExact() : this.getMonthInGanZhi(), this.getDayInGanZhi());
},
getDayJiShen:function(){
return LunarUtil.getDayJiShen(this.getMonth(),this.getDayInGanZhi());
@@ -1124,26 +1195,59 @@
getYueXiang:function(){
return LunarUtil.YUE_XIANG[this._p.day];
},
getYearNineStar:function(){
return LunarYear.fromYear(this._p.year).getNineStar();
_getYearNineStar:function(yearInGanZhi){
var index = LunarUtil.getJiaZiIndex(yearInGanZhi) + 1;
var yearOffset = 0;
if (index != LunarUtil.getJiaZiIndex(this.getYearInGanZhi()) + 1) {
yearOffset = -1;
}
var yuan = Math.floor((this._p.year + yearOffset + 2696) / 60) % 3;
var offset = (62 + yuan * 3 - index) % 9;
if(0 === offset){
offset = 9;
}
return NineStar.fromIndex(offset - 1);
},
getMonthNineStar:function(){
var n = 12;
var yearZhi = this.getYearZhi();
if ('子午卯酉'.indexOf(yearZhi)>-1) {
n = 18;
} else if ('辰戌丑未'.indexOf(yearZhi)>-1) {
n = 15;
getYearNineStar:function(sect){
var yearInGanZhi;
switch (sect) {
case 1:
yearInGanZhi = this.getYearInGanZhi();
break;
case 3:
yearInGanZhi = this.getYearInGanZhiExact();
break;
default:
yearInGanZhi = this.getYearInGanZhiByLiChun();
}
var m = this._p.month;
if(m<0){
m = -m;
return this._getYearNineStar(yearInGanZhi);
},
_getMonthNineStar:function(yearZhiIndex, monthZhiIndex){
var index = yearZhiIndex % 3;
var n = 27 - (index * 3);
if (monthZhiIndex < LunarUtil.BASE_MONTH_ZHI_INDEX) {
n -= 3;
}
var offset = (n-m)%9;
if(0===offset){
offset=9;
var offset = (n - monthZhiIndex) % 9;
return NineStar.fromIndex(offset);
},
getMonthNineStar:function(sect){
var yearZhiIndex;
var monthZhiIndex;
switch (sect) {
case 1:
yearZhiIndex = this._p.yearZhiIndex;
monthZhiIndex = this._p.monthZhiIndex;
break;
case 3:
yearZhiIndex = this._p.yearZhiIndexExact;
monthZhiIndex = this._p.monthZhiIndexExact;
break;
default:
yearZhiIndex = this._p.yearZhiIndexByLiChun;
monthZhiIndex = this._p.monthZhiIndex;
}
return NineStar.fromIndex(offset-1);
return this._getMonthNineStar(yearZhiIndex, monthZhiIndex);
},
getDayNineStar:function(){
var solarYmd = this._p.solar.toYmd();
@@ -1317,16 +1421,33 @@
return this._buildJieQi(name, near);
},
getCurrentJieQi:function(){
var name = this.getJieQi();
return name.length>0 ? this._buildJieQi(name,this.solar) : null;
for(var key in this._p.jieQi){
var d = this._p.jieQi[key];
if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){
return this._buildJieQi(this._convertJieQi(key), d);
}
}
return null;
},
getCurrentJie:function(){
var name = this.getJie();
return name.length>0 ? this._buildJieQi(name,this.solar) : null;
for(var i=0, j=Lunar.JIE_QI_IN_USE.length; i<j; i+=2){
var key = Lunar.JIE_QI_IN_USE[i];
var d = this._p.jieQi[key];
if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){
return this._buildJieQi(this._convertJieQi(key), d);
}
}
return null;
},
getCurrentQi:function(){
var name = this.getQi();
return name.length>0 ? this._buildJieQi(name,this.solar) : null;
for(var i=1, j=Lunar.JIE_QI_IN_USE.length; i<j; i+=2){
var key = Lunar.JIE_QI_IN_USE[i];
var d = this._p.jieQi[key];
if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){
return this._buildJieQi(this._convertJieQi(key), d);
}
}
return null;
},
getEightChar:function(){
if(!this._p.eightChar){
@@ -1538,11 +1659,14 @@
getHou:function(){
var jieQi = this.getPrevJieQi(true);
var name = jieQi.getName();
var currentCalendar = ExactDate.fromYmd(this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay());
var startSolar = jieQi.getSolar();
var startCalendar = ExactDate.fromYmd(startSolar.getYear(),startSolar.getMonth(),startSolar.getDay());
var days = days = ExactDate.getDaysBetween(startCalendar, currentCalendar);
return name + ' ' + LunarUtil.HOU[(Math.floor(days/5)) % LunarUtil.HOU.length];
var days = ExactDate.getDaysBetweenYmd(startSolar.getYear(),startSolar.getMonth(),startSolar.getDay(), this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay());
var max = LunarUtil.HOU.length - 1;
var offset = Math.floor(days / 5);
if (offset > max) {
offset = max;
}
return name + ' ' + LunarUtil.HOU[offset];
},
getDayLu:function(){
var gan = LunarUtil.LU[this.getDayGan()];
@@ -1605,10 +1729,24 @@
getIndex:function(){
var firstDate = ExactDate.fromYmd(this._p.year,this._p.month,1);
var firstDayWeek = firstDate.getDay();
if(firstDayWeek===0){
firstDayWeek = 7;
var offset = firstDayWeek - this._p.start;
if(offset < 0) {
offset += 7;
}
return Math.ceil((this._p.day+firstDayWeek-this._p.start)/7);
return Math.ceil((this._p.day + offset)/7);
},
/**
* 获取当前日期是在当年第几周
* @return number 周序号从1开始
*/
getIndexInYear:function(){
var firstDate = ExactDate.fromYmd(this._p.year, 1, 1);
var firstDayWeek = firstDate.getDay();
var offset = firstDayWeek - this._p.start;
if(offset < 0) {
offset += 7;
}
return Math.ceil((SolarUtil.getDaysInYear(this._p.year, this._p.month, this._p.day) + offset)/7);
},
/**
* 周推移
@@ -2008,6 +2146,8 @@
jieQiJulianDays: []
},
getYear:function(){return this._p.year;},
getGanIndex:function(){return this._p.ganIndex;},
getZhiIndex:function(){return this._p.zhiIndex;},
getGan:function(){return LunarUtil.GAN[this._p.ganIndex+1];},
getZhi:function(){return LunarUtil.ZHI[this._p.zhiIndex+1];},
getGanZhi:function(){return this.getGan()+this.getZhi();},
@@ -2094,22 +2234,13 @@
return _YUN[Math.floor((this._p.year+2696)/20)%9]+'运';
},
getNineStar:function(){
var index = LunarUtil.getJiaZiIndex(this.getGanZhi())+1;
var n = 65;
switch(this.getYuan()){
case '中元':
n = 68;
break;
case '下元':
n = 62;
break;
default:
var index = LunarUtil.getJiaZiIndex(this.getGanZhi()) + 1;
var yuan = Math.floor((this._p.year + 2696) / 60) % 3;
var offset = (62 + yuan * 3 - index) % 9;
if(0 === offset){
offset = 9;
}
var offset = (n-index)%9;
if(0===offset){
offset=9;
}
return NineStar.fromIndex(offset-1);
return NineStar.fromIndex(offset - 1);
},
getPositionXi:function(){
return LunarUtil.POSITION_XI[this._p.ganIndex+1];
@@ -2153,6 +2284,9 @@
toFullString:function(){
return this.getYear()+'年';
},
next:function(n){
return LunarYear.fromYear(this._p.year + n);
},
_compute:function(){
this._p.months = [];
this._p.jieQiJulianDays = [];
@@ -2293,6 +2427,79 @@
getPositionTaiSuiDesc:function(){
return LunarUtil.POSITION_DESC[this.getPositionTaiSui()];
},
getNineStar:function(){
var index = LunarYear.fromYear(this._p.year).getZhiIndex() % 3;
var m = this._p.month;
if (m < 0) {
m = -m;
}
var monthZhiIndex = (13 + m) % 12;
var n = 27 - (index * 3);
if (monthZhiIndex < LunarUtil.BASE_MONTH_ZHI_INDEX) {
n -= 3;
}
var offset = (n - monthZhiIndex) % 9;
return NineStar.fromIndex(offset);
},
next:function(n){
if (0 == n) {
return LunarMonth.fromYm(this._p.year, this._p.month);
} else {
var rest = Math.abs(n);
var ny = this._p.year;
var iy = ny;
var im = this._p.month;
var index = 0;
var months = LunarYear.fromYear(ny).getMonths();
var i;
var m;
var size;
if (n > 0) {
while (true) {
size = months.length;
for (i = 0; i < size; i++) {
m = months[i];
if (m.getYear() === iy && m.getMonth() === im) {
index = i;
break;
}
}
var more = size - index - 1;
if (rest < more) {
break;
}
rest -= more;
var lastMonth = months[size - 1];
iy = lastMonth.getYear();
im = lastMonth.getMonth();
ny++;
months = LunarYear.fromYear(ny).getMonths();
}
return months[index + rest];
} else {
while (true) {
size = months.length;
for (i = 0; i < size; i++) {
m = months[i];
if (m.getYear() === iy && m.getMonth() === im) {
index = i;
break;
}
}
if (rest <= index) {
break;
}
rest -= index;
var firstMonth = months[0];
iy = firstMonth.getYear();
im = firstMonth.getMonth();
ny--;
months = LunarYear.fromYear(ny).getMonths();
}
return months[index - rest];
}
}
},
toString:function(){return this.getYear()+'年'+(this.isLeap()?'闰':'')+LunarUtil.MONTH[Math.abs(this.getMonth())]+'月('+this.getDayCount()+')天';}
};
};
@@ -3326,7 +3533,8 @@
},
getShenGongNaYin:function(){return LunarUtil.NAYIN[this.getShenGong()];},
getLunar:function(){return this._p.lunar;},
getYun:function(gender){
getYun:function(gender, sect){
sect = (2 == sect) ? sect : 1;
var lunar = this.getLunar();
var yang = 0 === lunar.getYearGanIndexExact() % 2;
var man = 1 === gender;
@@ -3337,27 +3545,44 @@
var current = lunar.getSolar();
var start = forward ? current : prev.getSolar();
var end = forward ? next.getSolar() : current;
const endTimeZhiIndex = (end.getHour() === 23) ? 11 : LunarUtil.getTimeZhiIndex(end.toYmdHms().substr(11, 5));
const startTimeZhiIndex = (start.getHour() === 23) ? 11 : LunarUtil.getTimeZhiIndex(start.toYmdHms().substr(11, 5));
// 时辰差
var hourDiff = endTimeZhiIndex - startTimeZhiIndex;
var endCalendar = ExactDate.fromYmd(end.getYear(), end.getMonth(), end.getDay());
var startCalendar = ExactDate.fromYmd(start.getYear(), start.getMonth(), start.getDay());
// 天数差
var dayDiff = Math.floor((endCalendar - startCalendar) / (1000 * 3600 * 24));
if (hourDiff < 0) {
hourDiff += 12;
dayDiff--;
var year;
var month;
var day;
var hour = 0;
if (2 === sect) {
var minutes = Math.floor((end.getCalendar() - start.getCalendar()) / 60000);
year = Math.floor(minutes / 4320);
minutes -= year * 4320;
month = Math.floor(minutes / 360);
minutes -= month * 360;
day = Math.floor(minutes / 12);
minutes -= day * 12;
hour = minutes * 2;
} else {
var endTimeZhiIndex = (end.getHour() === 23) ? 11 : LunarUtil.getTimeZhiIndex(end.toYmdHms().substr(11, 5));
var startTimeZhiIndex = (start.getHour() === 23) ? 11 : LunarUtil.getTimeZhiIndex(start.toYmdHms().substr(11, 5));
// 时辰差
var hourDiff = endTimeZhiIndex - startTimeZhiIndex;
// 天数差
var dayDiff = ExactDate.getDaysBetweenYmd(start.getYear(), start.getMonth(), start.getDay(), end.getYear(), end.getMonth(), end.getDay());
if (hourDiff < 0) {
hourDiff += 12;
dayDiff--;
}
var monthDiff = Math.floor(hourDiff * 10 / 30);
month = dayDiff * 4 + monthDiff;
day = hourDiff * 10 - monthDiff * 30;
year = Math.floor(month / 12);
month = month - year * 12;
}
var monthDiff = Math.floor(hourDiff * 10 / 30);
var month = dayDiff * 4 + monthDiff;
var day = hourDiff * 10 - monthDiff * 30;
var year = Math.floor(month / 12);
month = month - year * 12;
return {
year: year,
month: month,
day: day
day: day,
hour: hour
};
})();
var buildLiuYue = function(liuNian, index){
@@ -3537,6 +3762,7 @@
startYear: start.year,
startMonth: start.month,
startDay: start.day,
startHour: start.hour,
forward: forward,
lunar: lunar
},
@@ -3544,6 +3770,7 @@
getStartYear: function(){return this._p.startYear;},
getStartMonth: function(){return this._p.startMonth;},
getStartDay: function(){return this._p.startDay;},
getStartHour: function(){return this._p.startHour;},
isForward: function(){return this._p.forward;},
getLunar: function(){return this._p.lunar;},
getStartSolar: function(){
@@ -3552,6 +3779,7 @@
c.setFullYear(birth.getYear() + this._p.startYear);
c.setMonth(birth.getMonth()-1+this._p.startMonth);
c.setDate(birth.getDay() + this._p.startDay);
c.setHours(birth.getHour() + this._p.startHour);
return Solar.fromDate(c);
},
getDaYun: function(n){
@@ -4122,7 +4350,7 @@
'冬至':'北方玄上玉宸天尊同黑帝五炁天君下降'
},
FESTIVAL: {
'1-1': [_f('天腊之辰', '天腊,此日五帝会于方九炁青天')],
'1-1': [_f('天腊之辰', '天腊,此日五帝会于方九炁青天')],
'1-3': [_f('郝真人圣诞'), _f('孙真人圣诞')],
'1-5': [_f('孙祖清静元君诞')],
'1-7': [_f('举迁赏会', '此日上元赐福,天官同地水二官考校罪福')],
@@ -4157,7 +4385,7 @@
'4-20': [_f('眼光圣母娘娘诞')],
'4-28': [_f('神农先帝诞')],
'5-1': [_f('南极长生大帝圣诞')],
'5-5': [_f('地腊之辰', '地腊,此日五帝会南方三炁丹天'), _f('南方雷祖圣诞'), _f('地祗温元帅圣诞'), _f('雷霆邓天君圣诞')],
'5-5': [_f('地腊之辰', '地腊,此日五帝会南方三炁丹天'), _f('南方雷祖圣诞'), _f('地祗温元帅圣诞'), _f('雷霆邓天君圣诞')],
'5-11': [_f('城隍爷圣诞')],
'5-13': [_f('关圣帝君降神'), _f('关平太子圣诞')],
'5-18': [_f('张天师圣诞')],
@@ -4199,7 +4427,7 @@
'9-22': [_f('增福财神诞')],
'9-23': [_f('萨翁真君圣诞')],
'9-28': [_f('五显灵官马元帅圣诞')],
'10-1': [_f('民岁腊之辰', '民岁腊,此日五帝会北方五炁黑天'), _f('东皇大帝圣诞')],
'10-1': [_f('民岁腊之辰', '民岁腊,此日五帝会北方五炁黑天'), _f('东皇大帝圣诞')],
'10-3': [_f('三茅应化真君圣诞')],
'10-6': [_f('天曹诸司五岳五帝圣诞')],
'10-15': [_f('下元水官大帝圣诞'), _f('建生大会', '此日下元解厄,水官同天地二官考校罪福')],
@@ -4210,7 +4438,7 @@
'11-9': [_f('湘子韩祖圣诞')],
'11-11': [_f('太乙救苦天尊圣诞')],
'11-26': [_f('北方五道圣诞')],
'12-8': [_f('王侯腊之辰', '王侯腊,此日五帝会上方玄都玉京')],
'12-8': [_f('王侯腊之辰', '王侯腊,此日五帝会上方玄都玉京')],
'12-16': [_f('南岳大帝圣诞'), _f('福德正神诞')],
'12-20': [_f('鲁班先师圣诞')],
'12-21': [_f('天猷上帝圣诞')],

View File

@@ -1,6 +1,6 @@
{
"name": "lunar-javascript",
"version": "1.2.21",
"version": "1.2.29",
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
"main": "index.js",
"scripts": {