Contents

Roo

DateTime.add_years()

Creates and returns a new DateTime object by adding the specified number of years to this DateTime object. This DateTime object is unaltered by the operation.

datetime.add_years(years As Number) as DateTime

Parameters

  • years. Number. The number of years to add to this DateTime object

Returns

  • A new DateTime object

Example

var bttf = DateTime(499137600) # Oct 26th 1985 01:20:00 AM.
var d = bttf.add_years(30)
print(d) # Oct 26th 2015 01:20:00 AM