Skip to content

Commit

Permalink
v1.6.8 修复八字转阳历为空的问题;修复一处法定假日数据错误;十神优化。
Browse files Browse the repository at this point in the history
  • Loading branch information
6tail committed Jan 3, 2024
1 parent 6581f01 commit ce267b4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 115 deletions.
9 changes: 9 additions & 0 deletions __tests__/EightChar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,12 @@ test('流月', () => {
const yun = eightChar.getYun(1);
expect(yun.getDaYun()[0].getLiuNian()[0].getLiuYue()[0].getGanZhi()).toBe('甲寅');
});

test('test19', () => {
const solarList = Solar.fromBaZi('丁丑','癸卯','癸丑','辛酉', 2, 1900);
const timeList = [];
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1997-03-12 18:00:00', '1937-03-27 18:00:00']);
});
8 changes: 8 additions & 0 deletions __tests__/Lunar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,3 +655,11 @@ test('test071', () => {
const solar = Solar.fromYmd(918, 1, 1);
expect(solar.getLunar().toString()).toBe('九一七年冬月十六');
});

test('test072', () => {
const solar = Solar.fromYmd(1991, 2, 15);
const lunar = solar.getLunar();
expect(lunar.toString()).toBe('一九九一年正月初一');
expect(lunar.getYearInGanZhi()).toBe('辛未');
expect(lunar.getYearShengXiao()).toBe('羊');
});
Loading

0 comments on commit ce267b4

Please sign in to comment.