Appearance
nepali-calendar-engine / toAD
Function: toAD()
toAD(
bsDate):Date
Defined in: converter/bs-to-ad.ts:19
Converts a Bikram Sambat date to a JavaScript Date (Gregorian/AD).
The returned Date is set to UTC midnight of the corresponding Gregorian date. Always read the result using getUTCFullYear / getUTCMonth / getUTCDate to avoid timezone-dependent off-by-one errors.
Complexity: O(1) — uses precomputed cumulative day-offset tables. Throws RangeError for invalid or out-of-range inputs.
Parameters
bsDate
Returns
Date