NAnt SDK Documentation - v0.92

DateTimeFunctions.GetYear Method 

Gets the year component of the specified date.

[Visual Basic]
<Function(Name:="get-year")>
Public Shared Function GetYear( _
   ByVal date As Date _
) As Integer
[C#]
[Function(Name="get-year")]
public static int GetYear(
   DateTime date
);

Parameters

date
The date of which to get the year component.

Return Value

The year, between 1 and 9999.

See Also

DateTimeFunctions Class | NAnt.Core.Functions Namespace