diff --git a/CHANGELOG.md b/CHANGELOG.md index d9985414..227c2c3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ - 🛠️ 修复(fix) - 🧹 琐事(Chore) +## v1.3.5 + +- 🛠️ 修复(fix) + + 🇨🇳 + + - 农历阳历转化错误 #76 + + 🇺🇸 + + - lunar calendar conversion error #76 + ## v1.3.4 - 🪄 功能(feature) diff --git a/package.json b/package.json index cc8b2f44..9d6246ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iztro", - "version": "1.3.4", + "version": "1.3.5", "description": "轻量级紫微斗数星盘生成库。可以通过出生年月日获取到紫微斗数星盘信息、生肖、星座等信息。A lightweight kit to astrolabe generator of The Purple Star Astrology (Zi Wei Dou Shu). The Purple Star Astrology(Zi Wei Dou Shu) is a Chinese ancient astrology. You're able to get your horoscope and personality from the astrolabe", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/__tests__/calendar/convertor.test.ts b/src/__tests__/calendar/convertor.test.ts index 9a789892..2fd47aa7 100644 --- a/src/__tests__/calendar/convertor.test.ts +++ b/src/__tests__/calendar/convertor.test.ts @@ -13,6 +13,8 @@ describe('calendar/convertor', () => { '1921-08-01': { date: '一九二一年六月廿八', date2: '1921-6-28', isLeap: false }, '2020-01-24': { date: '二〇一九年腊月三十', date2: '2019-12-30', isLeap: false }, '2020-01-25': { date: '二〇二〇年正月初一', date2: '2020-1-1', isLeap: false }, + '1996-07-15': { date: '一九九六年五月三十', date2: '1996-5-30', isLeap: false }, + '1996-07-16': { date: '一九九六年六月初一', date2: '1996-6-1', isLeap: false }, }; Object.entries(dates).map(([key, value]) => { diff --git a/src/__tests__/calendar/days.test.ts b/src/__tests__/calendar/days.test.ts index c1a610bc..f1f063b8 100644 --- a/src/__tests__/calendar/days.test.ts +++ b/src/__tests__/calendar/days.test.ts @@ -10,6 +10,7 @@ describe('calendar/days', () => { expect(getTotalDaysOfLunarMonth(2023, 6)).toEqual(29); expect(getTotalDaysOfLunarMonth(2023, 7)).toEqual(30); + expect(getTotalDaysOfLunarMonth(1996, 5)).toEqual(30); }); test('getTotalDaysOfSolarMonth()', () => { diff --git a/src/calendar/rules/lunarInfo.ts b/src/calendar/rules/lunarInfo.ts index 5896174f..719d6615 100644 --- a/src/calendar/rules/lunarInfo.ts +++ b/src/calendar/rules/lunarInfo.ts @@ -21,7 +21,7 @@ export const LUNAR_INFO = [ 0b1101001001010000, 0b1101010101011000, 0b1011010101000000, 0b1011011010100000, 0b11001010110100110, 0b1001010110110000, 0b100100110110000, 0b1010100101110100, 0b1010010010110000, 0b1011001001111010, 0b110101001010000, 0b110110101000000, 0b1010111101000110, 0b1010101101100000, 0b1001010101110000, 0b100101011110101, 0b100100101110000, - 0b110010010110000, 0b111010010100011, 0b1110101001010000, 0b110101101011000, 0b101010111000000, 0b1010101101100000, + 0b110010010110000, 0b111010010100011, 0b1110101001010000, 0b110101101011000, 0b101101011000000, 0b1010101101100000, 0b1001011011010101, 0b1001001011100000, 0b1100100101100000, 0b1101100101010100, 0b1101010010100000, 0b1101101001010000, 0b111010101010010, 0b101011010100000, 0b1010101110110111, 0b10010111010000, 0b1001001011010000, 0b1100101010110101, 0b1010100101010000, 0b1011010010100000, 0b1011101010100100, 0b1010110101010000, 0b101010111011001,