1
0
mirror of synced 2026-04-16 05:18:43 +08:00

v1.6.8 修复八字转阳历为空的问题;修复一处法定假日数据错误;十神优化。

This commit is contained in:
6tail
2024-01-03 19:50:31 +08:00
parent 6581f01956
commit c2ac8bd9a7
4 changed files with 29 additions and 115 deletions

View File

@@ -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']);
});

View File

@@ -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('羊');
});

125
lunar.js

File diff suppressed because one or more lines are too long

View File

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