@samirkoirala/bs-calendar-react
Version:
A comprehensive React and React Native library for Bikram Sambat (Nepali) calendar with holidays support. Cross-platform compatible.
44 lines (43 loc) • 1.47 kB
TypeScript
/**
* Get the number of days in a Bikram Sambat month
*
* Note: Unlike Gregorian calendar, Bikram Sambat months can have 29-32 days.
* This is a unique feature of the Nepali calendar system where some months
* (like Asadh, Jestha, Shrawan) can have 32 days in certain years.
*
* @param year Bikram Sambat year
* @param month Month number (1-12): 1=Baisakh, 2=Jestha, 3=Asadh, etc.
* @returns Number of days in the month (29-32)
*/
declare function daysInMonth(year: number, month: number): number;
declare function toBik(greg: string | Date): {
year: number;
month: number;
day: number;
};
declare function toDev(year: number, month: number, day: number): {
day: string;
month: string;
year: string;
};
declare function toBik_euro(greg: string | Date): string;
declare function toBik_dev(greg: string | Date): string;
declare function toBik_text(greg: string | Date): string;
declare function toGreg(year: number, month: number, day: number): {
year: number;
month: number;
day: number;
};
declare function toGreg_text(year: number, month: number, day: number): string;
declare const _default: {
daysInMonth: typeof daysInMonth;
toBik: typeof toBik;
toDev: typeof toDev;
toBik_dev: typeof toBik_dev;
toBik_euro: typeof toBik_euro;
toBik_text: typeof toBik_text;
toGreg: typeof toGreg;
toGreg_text: typeof toGreg_text;
};
export default _default;
export { daysInMonth, toBik, toDev, toGreg };