1
0
mirror of synced 2026-04-16 05:18:43 +08:00

Compare commits

...

1 Commits

Author SHA1 Message Date
6tail
c024e203a8 v1.2.32 节假日数据支持删除。 2022-05-20 20:06:35 +08:00
3 changed files with 18 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
var {HolidayUtil} = require('../lunar');
const {HolidayUtil} = require('../lunar');
test('test1', () => {
expect(HolidayUtil.getHoliday('2020-01-01') + '').toBe('2020-01-01 元旦节 2020-01-01');
@@ -42,3 +42,12 @@ test('test1', () => {
test('test2', () => {
expect(HolidayUtil.getHoliday('2016-10-04').getTarget()).toBe('2016-10-01');
});
test('testRemove', () => {
let holiday = HolidayUtil.getHoliday('2010-01-01');
expect(holiday.getName()).toBe('元旦');
HolidayUtil.fix('20100101~000000000000000000000000000');
holiday = HolidayUtil.getHoliday('2010-01-01');
expect(holiday).toBe(null);
});

File diff suppressed because one or more lines are too long

View File

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