DateTimeFunctions Class

Summary

Class which provides NAnt functions to work with date and time data.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions
Base Types
graph BT Type-->Base0["FunctionSetBase"] click Base0 "/api/NAnt.Core/FunctionSetBase" Base0-->Base1["Object"] Type["DateTimeFunctions"] class Type type-node

Syntax

[FunctionSet("datetime", "Date/Time")]
public class DateTimeFunctions : FunctionSetBase

Attributes

Type Description
FunctionSetAttribute Indicates that class should be treated as a set of functions.

Constructors

Name Summary
DateTimeFunctions(Project, PropertyDictionary) Initializes a new instance of the NAnt.Core.Functions.DateTimeFunctions class.

Properties

Name Value Summary
Project Project
Gets or sets the NAnt.Core.FunctionSetBase.Project that this functionset will reference.
Inherited from FunctionSetBase

Methods

Name Value Summary
GetDay(DateTime) int
Gets the day of the month represented by the specified date.
static
GetDayOfWeek(DateTime) int
Gets the day of the week represented by the specified date.
static
GetDayOfYear(DateTime) int
Gets the day of the year represented by the specified date.
static
GetDaysInMonth(int, int) int
Returns the number of days in the specified month of the specified year.
static
GetHour(DateTime) int
Gets the hour component of the specified date.
static
GetMillisecond(DateTime) int
Gets the milliseconds component of the specified date.
static
GetMinute(DateTime) int
Gets the minute component of the specified date.
static
GetMonth(DateTime) int
Gets the month component of the specified date.
static
GetSecond(DateTime) int
Gets the seconds component of the specified date.
static
GetTicks(DateTime) long
Gets the number of ticks that represent the specified date.
static
GetYear(DateTime) int
Gets the year component of the specified date.
static
IsLeapYear(int) bool
Returns an indication whether the specified year is a leap year.
static
Now() DateTime
Gets a System.DateTime that is the current local date and time on this computer.
static