1
0
mirror of synced 2025-11-06 03:20:45 +08:00

v1.7.0 修复每日宜忌错别字;去除每日宜忌的重复项。

This commit is contained in:
6tail
2025-02-12 16:12:20 +08:00
parent d038adead7
commit 2dcf35b1e8
5 changed files with 22 additions and 4 deletions

View File

@@ -15,3 +15,7 @@
## [1.6.13] - 2024-11-12
1. 新增2025年法定假日数据。
## [1.7.0] - 2025-02-12
1. 修复每日宜忌错别字。
2. 去除每日宜忌的重复项。

View File

@@ -51,3 +51,12 @@ test('testRemove', () => {
holiday = HolidayUtil.getHoliday('2010-01-01');
expect(holiday).toBe(null);
});
test('test2025', () => {
let names = HolidayUtil.NAMES;
names[0] = '元旦节';
HolidayUtil.fix(names, '');
const holiday = HolidayUtil.getHoliday(2025, 1, 1);
expect(holiday.getName()).toBe('元旦节');
});

View File

@@ -663,3 +663,8 @@ test('test072', () => {
expect(lunar.getYearInGanZhi()).toBe('辛未');
expect(lunar.getYearShengXiao()).toBe('羊');
});
test('test073', () => {
const solar = Lunar.fromYmd(2024, 10, 10).getSolar();
expect(solar.toString()).toBe('2024-11-10');
});

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "lunar-javascript",
"version": "1.6.13",
"version": "1.7.0",
"description": "lunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)、佛历和道历工具,支持星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋、凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.",
"main": "index.js",
"scripts": {