Skip to content

Commit

Permalink
🛠️ lunar calendar conversion error
Browse files Browse the repository at this point in the history
  • Loading branch information
SylarLong committed Oct 27, 2023
1 parent 36eb838 commit fdee62d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
- 🛠️ 修复(fix)
- 🧹 琐事(Chore)

## v1.3.5

- 🛠️ 修复(fix)

🇨🇳

- 农历阳历转化错误 #76

🇺🇸

- lunar calendar conversion error #76

## v1.3.4

- 🪄 功能(feature)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/calendar/convertor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]) => {
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/calendar/days.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/calendar/rules/lunarInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fdee62d

Please sign in to comment.