1
0
mirror of synced 2026-04-14 20:38:42 +08:00

v1.2.7 修复时区导致计算错误的问题。

This commit is contained in:
6tail
2021-10-06 21:48:37 +08:00
parent fdac493cee
commit 7d305771a9
4 changed files with 35 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
var {Solar, Lunar} = require('../lunar');
var {Solar, Lunar, LunarYear} = require('../lunar');
test('干支', () => {
let solar = Solar.fromYmdHms(2020, 1, 1, 13, 22, 0);
@@ -530,3 +530,13 @@ test('test044', () => {
const solar = Solar.fromYmd(1, 1, 1);
expect(solar.getLunar().getYearShengXiao()).toBe('猴');
});
test('test045', () => {
const lunarMonth = LunarYear.fromYear(2020).getMonth(-4);
expect(lunarMonth.toString()).toBe('2020年闰四月(29)天');
});
test('test046', () => {
const solar = Solar.fromYmdHms(2000, 1, 1, 16, 0, 0);
expect(solar.getLunar().getHour()).toBe(16);
});