1
0
mirror of synced 2026-04-05 18:48:33 +08:00

v1.2.6 修复公元0至4年转阴历错误的问题。

This commit is contained in:
6tail
2021-09-17 21:59:06 +08:00
parent c3e441ff22
commit fdac493cee
3 changed files with 34 additions and 2 deletions

View File

@@ -510,3 +510,23 @@ test('test038', () => {
const lunar = Lunar.fromYmd(7013, -11, 4);
expect(lunar.getSolar().toString()).toBe('7013-12-24');
});
test('test041', () => {
const solar = Solar.fromYmd(4, 2, 10);
expect(solar.getLunar().getYearShengXiao()).toBe('鼠');
});
test('test042', () => {
const solar = Solar.fromYmd(4, 2, 9);
expect(solar.getLunar().getYearShengXiao()).toBe('猪');
});
test('test043', () => {
const solar = Solar.fromYmd(1, 2, 12);
expect(solar.getLunar().getYearShengXiao()).toBe('鸡');
});
test('test044', () => {
const solar = Solar.fromYmd(1, 1, 1);
expect(solar.getLunar().getYearShengXiao()).toBe('猴');
});