UNPKG

@manojshrestha/nepali-date

Version:

Lightweight TypeScript library for Nepali date conversion and date-picking

26 lines (25 loc) 886 B
import { BsDate, AdDate, DateFormat, Locale } from '../types'; /** * Date formatting utilities */ /** * Format a BS date according to the given format string * @param date The BS date to format * @param format The format string * @param locale The locale to use ('en' or 'ne') * @returns The formatted date string */ export declare function formatBsDate(date: BsDate, format?: DateFormat, locale?: Locale): string; /** * Format an AD date according to the given format string * @param date The AD date to format * @param format The format string * @param locale The locale to use ('en' or 'ne') * @returns The formatted date string */ export declare function formatAdDate(date: AdDate, format?: DateFormat, locale?: Locale): string; /** * Detect the user's locale * @returns The detected locale ('ne' or 'en' default) */ export declare function detectLocale(): Locale;