@manojshrestha/nepali-date
Version:
Lightweight TypeScript library for Nepali date conversion and date-picking
39 lines (38 loc) • 784 B
TypeScript
/**
* Types for Nepali date library
*/
export type DateFormat = string;
export type Locale = 'ne' | 'en';
export type Calendar = 'BS' | 'AD';
export interface BsDate {
year: number;
month: number;
day: number;
}
export interface AdDate {
year: number;
month: number;
day: number;
}
export interface DateConversion {
bs: BsDate;
ad: AdDate;
}
export interface MonthData {
en: string;
ne: string;
days: number;
}
export interface DayNames {
en: string[];
ne: string[];
}
export interface DatePickerOptions {
defaultCalendar?: Calendar;
minDate?: BsDate | AdDate;
maxDate?: BsDate | AdDate;
disabledDays?: number[];
holidays?: Array<BsDate | AdDate>;
locale?: Locale;
theme?: 'light' | 'dark' | 'auto';
}