Click or drag to resize

DateTimeMathRoundUpYears Method

Rounds up the date so that it starts at the first day of a year and is greater than or equal to x. The resulting year number then is 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 RoundUpYears(
	DateTime x,
	int n
)

Parameters

x  DateTime
The date.
n  Int32
The number of years to round up. Must be greater than or equal to 1.

Return Value

DateTime
A date >=x, and with a year number which is k*n, with k being an integer.
See Also