Skip to content

Documentation / jalali-js / addYears

Function: addYears()

addYears(date, years, system): CalendarDateFields

Defined in: date-math.ts:68

Adds years (negative to subtract) whole calendar years to date, in system. The day clamps like addMonths() (Esfand 30 of a leap year plus one year gives Esfand 29).

Parameters

date

CalendarDateFields

years

number

system

CalendarSystem

Returns

CalendarDateFields