DateTimeMathRoundDownMonths Method |
Rounds down the date so that it starts at the first day of a month and is less 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 RoundDownMonths(
DateTime x,
int n
)
Parameters
- x DateTime
- The date.
- n Int32
- The number of months to round down. 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 <1, the year number is decreased accordingly.
See Also