@chnlib/chinese-holiday
Version:
27 lines (26 loc) • 827 B
TypeScript
import { Dayjs } from "dayjs";
import { IHoliday } from "./type";
/**
* 判断是否为节假日
* @param value 日期
* @returns
*/
declare function isHoliday(value: string | number | Dayjs): boolean;
/**
* 判断是否为工作日
* @param value 日期
* @returns
*/
declare function isWorkday(value: string | number | Dayjs): boolean;
/**
* 查找日期范围内的节假日,包含开始日期和结束日期
* @param start 开始日期
* @param end 结束日期,如果没有传结束日期,返回开始日期后的所有节假日
*/
declare function findHolidays(start: string | number | Dayjs, end?: string | number | Dayjs): void | IHoliday[];
declare const _default: {
isHoliday: typeof isHoliday;
isWorkday: typeof isWorkday;
findHolidays: typeof findHolidays;
};
export default _default;