Calculates the Jalali (Persian) year equivalent to a given Gregorian year.
The calculation is based on whether the Persian New Year (Nowruz, March 21st) has already occurred relative to the reference date.
The Gregorian year to convert.
The reference date to determine if the Jalali year has started (default: current date).
The Jalali year corresponding to the provided Gregorian year.
buildJalaliYear(2025); // returns 1404buildJalaliYear(2025, new Date('2025-02-15')); // returns 1403 Copy
buildJalaliYear(2025); // returns 1404buildJalaliYear(2025, new Date('2025-02-15')); // returns 1403
Calculates the Jalali (Persian) year equivalent to a given Gregorian year.
The calculation is based on whether the Persian New Year (Nowruz, March 21st) has already occurred relative to the reference date.