DateTime.addYears

Creates a copy of datetime and adds the specified number of years to the copy. Add negative values to subtract years.

As with Date.timeAddMonths, if the resulting date would be 29th February on a non-leap year, the day will be clamped to 28th February.

class DateTime
addYears
(
int years
)

Parameters

years int

the number of years

Return Value

Type: DateTime

the newly created gstreamer.DateTime which should be freed with Date.timeUnref.

Meta

Since

2.26