EssentialsTime.AddYears method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time
Assembly Skybrud.Essentials.dll

AddYears(int)

Returns a new EssentialsTime that adds the specified number of years to the value of this instance.

public EssentialsTime AddYears(int value)

Parameters

value int

A number of years. The value parameter can be negative or positive.

Returns

An object whose value is the sum of the date and time represented by this instance and the number of years represented by value.

Exceptions

The resulting EssentialsTime is less than System.DateTimeOffset.MinValue or greater than System.DateTimeOffset.MaxValue.