1
0
mirror of synced 2026-04-15 21:08:40 +08:00

Compare commits

...

5 Commits

5 changed files with 425 additions and 36 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', () => {

View File

@@ -1,8 +1,9 @@
const {Solar, Lunar, NineStar, EightChar, SolarWeek, SolarMonth, SolarSeason, SolarHalfYear, SolarYear, LunarMonth, LunarYear, LunarTime, ShouXingUtil, SolarUtil, LunarUtil, HolidayUtil} = require('./lunar.js')
const {Solar, Lunar, Foto, NineStar, EightChar, SolarWeek, SolarMonth, SolarSeason, SolarHalfYear, SolarYear, LunarMonth, LunarYear, LunarTime, ShouXingUtil, SolarUtil, LunarUtil, FotoUtil, HolidayUtil} = require('./lunar.js')
module.exports = {
Solar: Solar,
Lunar: Lunar,
Foto: Foto,
NineStar: NineStar,
EightChar: EightChar,
SolarWeek: SolarWeek,
@@ -16,5 +17,6 @@ module.exports = {
ShouXingUtil: ShouXingUtil,
SolarUtil: SolarUtil,
LunarUtil: LunarUtil,
FotoUtil: FotoUtil,
HolidayUtil: HolidayUtil
}

428
lunar.js

File diff suppressed because one or more lines are too long

View File

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