1
0
mirror of synced 2026-04-05 02:28:33 +08:00

v1.3.3 优化八字转阳历;修复少量农历年的月份错误;新增农历年天数和当年月份列表。

This commit is contained in:
6tail
2023-03-11 19:15:02 +08:00
parent 13c251080b
commit 853cb2f3a9
5 changed files with 188 additions and 66 deletions

View File

@@ -107,3 +107,30 @@ test('22', () => {
const solar = Solar.fromYmd(1582, 10, 15);
expect(solar.nextDay(-5).toYmd()).toBe('1582-09-30');
});
test('23', () => {
const solarList = Solar.fromBaZi('癸卯', '甲寅', '癸丑', '甲子', 2, 1843);
const timeList = [];
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['2023-02-24 23:00:00', '1843-02-08 23:00:00']);
});
test('24', () => {
const solarList = Solar.fromBaZi('己亥', '丁丑', '壬寅', '戊申');
const timeList = [];
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1960-01-15 16:00:00', '1900-01-29 16:00:00']);
});
test('25', () => {
const solarList = Solar.fromBaZi('己亥', '丙子', '癸酉', '庚申');
const timeList = [];
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1959-12-17 16:00:00']);
});