Static Methods
NepaliDate.maximum()
Static method returning the maximum supported date boundary for the NepaliDate calendar engine.
The maximum static method returns a native JavaScript Date object representing the latest Gregorian date supported by the library calendar engine. This corresponds to the final day of Chaitra in year 2100 BS and serves as an upper bound for date validation and calendar limits.
Import
import { NepaliDate } from "nepali-date-library";Signature
static maximum(): Date;Parameters
This method does not take any parameters.
Return Value
- Type:
Date - Returns a standard JavaScript
Dateinstance representing the absolute upper limit of the calendar mapping dataset.
Examples
Checking Upper Calendar Limit
import { NepaliDate } from "nepali-date-library";
const maxDate = NepaliDate.maximum();
console.log(maxDate.toISOString());
// Converting maximum back to NepaliDate
const nepaliMax = new NepaliDate(maxDate);
console.log(nepaliMax.format("YYYY-MM-DD")); // "2100-12-30" (or 31)Related
NepaliDate.minimum(): Earliest date supported.NEPALI_DATE_MAP: Calendar map dataset.
Advertisement
NepaliDate.minimum()
Static method returning the minimum supported date boundary for the NepaliDate calendar engine.
NepaliDate.getMonthName()
Static utility to retrieve the localized English or Nepali month name for any month index.