DateTimeMathRoundUpMonths Method |
Rounds up the date so that it starts at the first day of a month and is greater than or equal to x.
The resulting month number then is 1 + k*n, with k being an integer.
Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static DateTime RoundUpMonths(
DateTime x,
int n
)
Parameters
- x DateTime
- The date.
- n Int32
- The number of months to round up. Must be greater than or equal to 1.
Return Value
DateTimeA date >=
x, and with a month number which is 1 + k*
n. If the resulting month is >12, the year number is increased accordingly.
See Also