Static Methods
NepaliDate.minimum()
Static method returning the minimum supported date boundary for the NepaliDate calendar engine.
The minimum static method returns a native JavaScript Date object representing the earliest Gregorian date supported by the library calendar engine. This corresponds to the first day of Baisakh in year 1976 BS and provides a reliable lower boundary for date pickers and form input validation.
Import
import { NepaliDate } from "nepali-date-library";Signature
static minimum(): Date;Parameters
This method does not take any parameters.
Return Value
- Type:
Date - Returns a standard JavaScript
Dateinstance representing the minimum boundary (1919-04-13T00:00:00.000Z).
Examples
Checking Lower Calendar Limit
import { NepaliDate } from "nepali-date-library";
const minDate = NepaliDate.minimum();
console.log(minDate.toISOString()); // "1919-04-13T00:00:00.000Z"
// Converting minimum back to NepaliDate
const nepaliMin = new NepaliDate(minDate);
console.log(nepaliMin.format("YYYY-MM-DD")); // "1976-01-01"Related
NepaliDate.maximum(): Latest date supported.NEPALI_DATE_MAP: Calendar map dataset.
Advertisement
NepaliDate.isValid()
Static validation function to verify whether a given year, month, and day combination forms a valid Bikram Sambat date.
NepaliDate.maximum()
Static method returning the maximum supported date boundary for the NepaliDate calendar engine.