DateTimeFunctions.

GetDayOfWeek(DateTime) Method

Summary

Gets the day of the week represented by the specified date.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions
Containing Type
DateTimeFunctions

Syntax

[Function("get-day-of-week")]
public static int GetDayOfWeek(DateTime date)

Attributes

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

Parameters

Name Type Description
date DateTime The date of which to get the day of the week.

Return Value

Type Description
int The day of the week, ranging from zero, indicating Sunday, to six, indicating Saturday.