xtd 0.2.0
Loading...
Searching...
No Matches

◆ add_minutes()

date_time xtd::date_time::add_minutes ( double  value) const

Returns a new xtd::date_time that adds the specified number of minutes to the value of this instance.

Parameters
valueA number of whole and fractional minutes. 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 minutes represented by value.
Exceptions
xtd::argument_out_of_range_exceptionThe resulting xtd::date_time is less than xtd::date_time::min_value or greater than xtd::date_time::max_value.
Examples
The following example uses the xtd::date_time::add_minutes method to add a number of whole and fractional values to a date and time.
Remarks
This method does not change the value of this xtd::date_time. Instead, it returns a new xtd::date_time whose value is the result of this operation.
The fractional part of value is the fractional part of a minute. For example, 4.5 is equivalent to 4 minutes, 30 seconds, 0 milliseconds, and 0 ticks.