1
0
mirror of synced 2026-03-24 21:08:34 +08:00

v1.2.1 修复1-99年日期错乱的问题;增加单元测试。

This commit is contained in:
6tail
2021-04-13 22:20:23 +08:00
parent 8718348cd7
commit 0c000c99a7
20 changed files with 1028 additions and 7 deletions

View File

@@ -0,0 +1,13 @@
var {SolarSeason} = require('../lunar');
test('toString()', () => {
const season = SolarSeason.fromYm(2019, 5);
expect(season.toString()).toBe('2019.2');
expect(season.next(1).toString()).toBe('2019.3');
});
test('toFullString()', () => {
const season = SolarSeason.fromYm(2019, 5);
expect(season.toFullString()).toBe('2019年2季度');
expect(season.next(1).toFullString()).toBe('2019年3季度');
});