DateTimeFunctions.

GetDaysInMonth(int, int) Method

Summary

Returns the number of days in the specified month of the specified year.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions
Containing Type
DateTimeFunctions

Syntax

[Function("get-days-in-month")]
public static int GetDaysInMonth(int year, int month)

Attributes

Type Description
FunctionAttribute Indicates that the method should be exposed as a function in NAnt build files.

Parameters

Name Type Description
year int The year.
month int The month (a number ranging from 1 to 12).

Return Value

Type Description
int The number of days in month for the specified year.