Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
004899148d | ||
|
|
c142ad7f6c | ||
|
|
8d131aa31a | ||
|
|
34469699a5 | ||
|
|
ca64cf0a73 | ||
|
|
1f2c867028 | ||
|
|
56addd223b |
@@ -415,12 +415,12 @@ test('test022', () => {
|
||||
|
||||
test('test023', () => {
|
||||
const lunar = Lunar.fromYmd(2022, 1, 1);
|
||||
expect(lunar.getYearNineStar().toString()).toBe('五黄土玉衡');
|
||||
expect(lunar.getYearNineStar().toString()).toBe('六白金开阳');
|
||||
});
|
||||
|
||||
test('test024', () => {
|
||||
const lunar = Lunar.fromYmd(2033, 1, 1);
|
||||
expect(lunar.getYearNineStar().toString()).toBe('三碧木天玑');
|
||||
expect(lunar.getYearNineStar().toString()).toBe('四绿木天权');
|
||||
});
|
||||
|
||||
test('test025', () => {
|
||||
|
||||
@@ -22,3 +22,68 @@ test('test4', () => {
|
||||
const year = LunarYear.fromYear(2021);
|
||||
expect(year.getGengTian()).toBe('十一牛耕田');
|
||||
});
|
||||
|
||||
test('test5', () => {
|
||||
const year = LunarYear.fromYear(1864);
|
||||
expect(year.getYuan()).toBe('上元');
|
||||
});
|
||||
|
||||
test('test6', () => {
|
||||
const year = LunarYear.fromYear(1923);
|
||||
expect(year.getYuan()).toBe('上元');
|
||||
});
|
||||
|
||||
test('test7', () => {
|
||||
const year = LunarYear.fromYear(1924);
|
||||
expect(year.getYuan()).toBe('中元');
|
||||
});
|
||||
|
||||
test('test8', () => {
|
||||
const year = LunarYear.fromYear(1983);
|
||||
expect(year.getYuan()).toBe('中元');
|
||||
});
|
||||
|
||||
test('test9', () => {
|
||||
const year = LunarYear.fromYear(1984);
|
||||
expect(year.getYuan()).toBe('下元');
|
||||
});
|
||||
|
||||
test('test10', () => {
|
||||
const year = LunarYear.fromYear(2043);
|
||||
expect(year.getYuan()).toBe('下元');
|
||||
});
|
||||
|
||||
test('test11', () => {
|
||||
const year = LunarYear.fromYear(1864);
|
||||
expect(year.getYun()).toBe('一运');
|
||||
});
|
||||
|
||||
test('test12', () => {
|
||||
const year = LunarYear.fromYear(1883);
|
||||
expect(year.getYun()).toBe('一运');
|
||||
});
|
||||
|
||||
test('test13', () => {
|
||||
const year = LunarYear.fromYear(1884);
|
||||
expect(year.getYun()).toBe('二运');
|
||||
});
|
||||
|
||||
test('test14', () => {
|
||||
const year = LunarYear.fromYear(1903);
|
||||
expect(year.getYun()).toBe('二运');
|
||||
});
|
||||
|
||||
test('test15', () => {
|
||||
const year = LunarYear.fromYear(1904);
|
||||
expect(year.getYun()).toBe('三运');
|
||||
});
|
||||
|
||||
test('test16', () => {
|
||||
const year = LunarYear.fromYear(1923);
|
||||
expect(year.getYun()).toBe('三运');
|
||||
});
|
||||
|
||||
test('test17', () => {
|
||||
const year = LunarYear.fromYear(2004);
|
||||
expect(year.getYun()).toBe('八运');
|
||||
});
|
||||
|
||||
@@ -53,3 +53,27 @@ test('test9()', () => {
|
||||
const lunar = solar.getLunar();
|
||||
expect(lunar.getWuHou()).toBe('蚯蚓结');
|
||||
});
|
||||
|
||||
test('test10', () => {
|
||||
const solar = Solar.fromYmd(2021,12,21);
|
||||
const lunar = solar.getLunar();
|
||||
expect(lunar.getHou()).toBe('冬至 初候');
|
||||
});
|
||||
|
||||
test('test11', () => {
|
||||
const solar = Solar.fromYmd(2021,12,26);
|
||||
const lunar = solar.getLunar();
|
||||
expect(lunar.getHou()).toBe('冬至 二候');
|
||||
});
|
||||
|
||||
test('test12', () => {
|
||||
const solar = Solar.fromYmd(2021,12,31);
|
||||
const lunar = solar.getLunar();
|
||||
expect(lunar.getHou()).toBe('冬至 三候');
|
||||
});
|
||||
|
||||
test('test13', () => {
|
||||
const solar = Solar.fromYmd(2022,1,5);
|
||||
const lunar = solar.getLunar();
|
||||
expect(lunar.getHou()).toBe('小寒 初候');
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lunar-javascript",
|
||||
"version": "1.2.17",
|
||||
"version": "1.2.22",
|
||||
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user