Skip to content

Calendar.AddMonths

Overview

DateTimeOffset Calendar.AddMonths ( dateTime, months )
Adds specified number of months to specified date time value and returns.

Arguments

DateTimeOffset dateTime Specifies the base date time value.

Number months Specifies the how many months will be added to dateTime parameter.

Remarks

Examples

var newDate = $Calendar.AddMonths($Calendar.Today, 2); //adds 2 months to the current date and returns DateTimeOffset object.

See Also