Versions Compared

Key

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

Overview

Adds specified number of days to specified date time value and returns next valid date time.

DateTimeOffset Calendar.AddDays(dateTime: DateTimeOffset, days: number)

Arguments

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

Remarks

This method add days to specified date parameter and returns the next valid date by calendar rules. If you want to add days by validating each day calendar rules please useCalendar.AddTimeSpanmethod. (Ex: $Calendar.AddTimeSpan("4.00:00:00")

Example

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

Examples

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