Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

Returns sum of specified dateTime and timespan string.

DateTimeOffset Calendar.AddTimeSpan(date: DateTimeOffset, time: string)

Arguments

string time

Example

//Adds exactly 1 day, 2 hours, 30 minutes and 45 seconds to the current time.
var newDate = $Calendar.StandardCalendar.AddTimeSpan($Calendar.Today, '1.02:30:45');
var newDate = $Calendar.StandardCalendar.AddTimeSpan($Calendar.Today, 'P1DT2H');

Examples

//Adds exactly 1 day, 2 hours, 30 minutes and 45 seconds to the current time.
var newDate = $Calendar.StandardCalendar.AddTimeSpan($Calendar.Today, '1.02:30:45');
var newDate = $Calendar.StandardCalendar.AddTimeSpan($Calendar.Today, 'P1DT2H');
  • No labels