Click or drag to resize

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.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
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

DateTime
A 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