date-picker-svelte
Version:
Date and time picker for Svelte
18 lines (17 loc) • 1.07 kB
TypeScript
import type { FormatToken } from './parse.js';
export declare function isLeapYear(year: number): boolean;
export declare function getMonthLength(year: number, month: number): number;
export declare function toText(date: Date | null, formatTokens: FormatToken[]): string;
export declare function isSameDate(date1: Date, date2: Date): boolean;
export type CalendarDay = {
year: number;
month: number;
number: number;
};
export declare function getMonthDays(year: number, month: number): CalendarDay[];
export declare function getCalendarDays(value: Date, weekStartsOn: number): CalendarDay[];
export declare function applyTimePrecision(date: Date, timePrecision: 'minute' | 'second' | 'millisecond' | null): void;
export declare function cloneDate(d: Date): Date;
export declare function toValidDate(oldDate: Date, newDate: Date, minDate: Date, maxDate: Date, isDisabledDate: ((date: Date) => boolean) | null): Date;
export declare function clamp(value: Date, min: Date, max: Date): Date;
export declare function clampDate(value: Date, min: Date, max: Date): Date;