1
0
mirror of synced 2026-04-16 13:28:39 +08:00

Compare commits

...

4 Commits

Author SHA1 Message Date
6tail
2106d0ee62 v1.2.15 修复星宿方位错误。 2021-11-20 20:22:49 +08:00
6tail
6af2de6a6e v1.2.14 修正胎神数据;增加福神流派。 2021-11-14 10:16:24 +08:00
6tail
7475d1d315 v1.2.13 新增2022年法定假日。 2021-11-02 22:10:50 +08:00
6tail
61512a3433 v1.2.12 恢复Lunar中的getOtherFestivals方法并更改为传统节日。 2021-10-27 21:04:37 +08:00
4 changed files with 75 additions and 35 deletions

View File

@@ -545,3 +545,28 @@ test('test047', () => {
const lunar = Solar.fromYmd(2017, 2, 15).getLunar();
expect(lunar.getDayLu()).toBe('子命互禄 辛命进禄');
});
test('test048', () => {
const lunar = Solar.fromYmd(2021, 11, 13).getLunar();
expect(lunar.getDayPositionTai()).toBe('碓磨厕 外东南');
});
test('test049', () => {
const lunar = Solar.fromYmd(2021, 11, 12).getLunar();
expect(lunar.getDayPositionTai()).toBe('占门碓 外东南');
});
test('test050', () => {
const lunar = Solar.fromYmd(2021, 11, 13).getLunar();
expect(lunar.getDayPositionFuDesc()).toBe('西南');
});
test('test051', () => {
const lunar = Solar.fromYmd(2021, 11, 12).getLunar();
expect(lunar.getDayPositionFuDesc()).toBe('正北');
});
test('test052', () => {
const lunar = Solar.fromYmd(2011, 11, 12).getLunar();
expect(lunar.getDayPositionTai()).toBe('厕灶厨 外西南');
});

View File

@@ -5,7 +5,7 @@ test('test', () => {
expect(solar.toString()).toBe('2019-05-01');
expect(solar.toFullString()).toBe('2019-05-01 00:00:00 星期三 (劳动节) 金牛座');
expect(solar.getLunar().toString()).toBe('二〇一九年三月廿七');
expect(solar.getLunar().toFullString()).toBe('二〇一九年三月廿七 己亥(猪)年 戊辰(龙)月 戊戌(狗)日 子(鼠)时 纳音[平地木 大林木 平地木 桑柘木] 星期三 西方白虎 星宿[参水猿](吉) 彭祖百忌[戊不受田田主不祥 戌不吃犬作怪上床] 喜神方位[巽](东南) 阳贵神方位[艮](东北) 阴贵神方位[坤](西南) 福神方位[](北) 财神方位[坎](正北) 冲[(壬辰)龙] 煞[北]');
expect(solar.getLunar().toFullString()).toBe('二〇一九年三月廿七 己亥(猪)年 戊辰(龙)月 戊戌(狗)日 子(鼠)时 纳音[平地木 大林木 平地木 桑柘木] 星期三 西方白虎 星宿[参水猿](吉) 彭祖百忌[戊不受田田主不祥 戌不吃犬作怪上床] 喜神方位[巽](东南) 阳贵神方位[艮](东北) 阴贵神方位[坤](西南) 福神方位[](北) 财神方位[坎](正北) 冲[(壬辰)龙] 煞[北]');
});
test('1', () => {

File diff suppressed because one or more lines are too long

View File

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