fomantic-ui-react
Version:
Fomantic-UI React -- A React Component Library.
24 lines (23 loc) • 835 B
TypeScript
import dayjs from 'dayjs';
import { CalendarCell } from './type';
/**
* 获取一个日期是周几(1~7)
*/
export declare const getDay: (dt: Date) => number;
/**
* 创建日历单元格数据
* @param year 日历年份
* @param month 日历月份
* @param firstDayOfWeek 周起始日(1~7)
* @param currentValue 当前日期
* @param format 日期格式
*/
export declare const createDateList: (year: number, month: number, firstDayOfWeek: number, currentValue: dayjs.Dayjs, format: string) => CalendarCell[][];
/**
* 创建月历单元格数据
* @param year 月历年份
* @param currentValue 当前日期
* @param format 输出格式
* @param rowNum 一行日历的个数
*/
export declare const createMonthList: (year: number, currentValue: dayjs.Dayjs, format: string, rowNum?: number) => CalendarCell[][];