Skip to content

Commit

Permalink
v1.6.10 八字转阳历结果按时间先后排序,转换速度大幅提升。
Browse files Browse the repository at this point in the history
  • Loading branch information
6tail committed Feb 6, 2024
1 parent 9f3e2d2 commit 4e66c32
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 159 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog


## [1.6.10] - 2024-02-06
1. 八字转阳历结果按时间先后排序,转换速度大幅提升。
2 changes: 1 addition & 1 deletion __tests__/EightChar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ test('test19', () => {
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1997-03-12 18:00:00', '1937-03-27 18:00:00']);
expect(timeList).toStrictEqual(['1937-03-27 18:00:00', '1997-03-12 18:00:00']);
});


Expand Down
14 changes: 7 additions & 7 deletions __tests__/Solar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('16', () => {
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1976-09-21 12:00:00', '1916-10-06 12:00:00']);
expect(timeList).toStrictEqual(['1916-10-06 12:00:00', '1976-09-21 12:00:00']);
});

test('17', () => {
Expand All @@ -72,7 +72,7 @@ test('17', () => {
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1999-07-21 16:00:00', '1939-08-05 16:00:00']);
expect(timeList).toStrictEqual(['1939-08-05 16:00:00', '1999-07-21 16:00:00']);
});

test('18', () => {
Expand All @@ -81,7 +81,7 @@ test('18', () => {
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1960-12-17 12:00:00', '1901-01-01 12:00:00']);
expect(timeList).toStrictEqual(['1901-01-01 12:00:00', '1960-12-17 12:00:00']);
});

test('19', () => {
Expand All @@ -90,7 +90,7 @@ test('19', () => {
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['2020-07-21 22:00:00', '1960-08-05 22:00:00']);
expect(timeList).toStrictEqual(['1960-08-05 22:00:00', '2020-07-21 22:00:00']);
});

test('20', () => {
Expand All @@ -109,12 +109,12 @@ test('22', () => {
});

test('23', () => {
const solarList = Solar.fromBaZi('癸卯', '甲寅', '癸丑', '甲子', 2, 1843);
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']);
expect(timeList).toStrictEqual(['1843-02-09 00:00:00', '2023-02-25 00:00:00']);
});

test('24', () => {
Expand All @@ -123,7 +123,7 @@ test('24', () => {
solarList.forEach(solar => {
timeList.push(solar.toYmdHms());
})
expect(timeList).toStrictEqual(['1960-01-15 16:00:00', '1900-01-29 16:00:00']);
expect(timeList).toStrictEqual(['1900-01-29 16:00:00', '1960-01-15 16:00:00']);
});

test('25', () => {
Expand Down
Loading

0 comments on commit 4e66c32

Please sign in to comment.