Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Returns sum of specified dateTime and years.

DateTimeOffset Calendar.AddYears(dateTime: DateTimeOffset, years: number)

Arguments

Specifies the base date time value.
number years
Specifies the how many years will be added to dateTime parameter.

Example

Code Block
languagejs
var newDate = $Calendar.AddYears($Calendar.Today, 3); //adds 3 years to the current date and returns DateTimeOffset object.

Examples

Code Block
languagejs
var newDate = $Calendar.AddYears($Calendar.Today, 3); //adds 3 years to the current date and returns DateTimeOffset object.