Class Date
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
Fields
View Source
DaysInWeek
Declaration
public static readonly int DaysInWeek
Field Value
View Source
FirstDayOfMonth
Declaration
public static readonly int FirstDayOfMonth
Field Value
View Source
FirstMonthOfCalendarYear
Declaration
public static readonly int FirstMonthOfCalendarYear
Field Value
View Source
LastMonthOfCalendarYear
Declaration
public static readonly int LastMonthOfCalendarYear
Field Value
View Source
MonthsInYear
Number of months in a year
Declaration
public static readonly int MonthsInYear
Field Value
Properties
View Source
MaxValue
Represents the largest possible value of a time instant
Declaration
public static DateTime MaxValue { get; }
Property Value
View Source
MinValue
Represents the smallest possible value of a time instant
Declaration
public static DateTime MinValue { get; }
Property Value
View Source
Now
Gets a time instant that is set to the current date and time
Declaration
public static DateTime Now { get; }
Property Value
View Source
Today
Gets a time instant that is set to the current day
Declaration
public static DateTime Today { get; }
Property Value
View Source
Tomorrow
Gets a time instant that is set to the next day
Declaration
public static DateTime Tomorrow { get; }
Property Value
View Source
Yesterday
Gets a time instant that is set to the previous day
Declaration
public static DateTime Yesterday { get; }
Property Value
Methods
View Source
DayEnd(int, int, int)
Get the day end date and time in UTC
Declaration
public static DateTime DayEnd(int year, int month, int day)
Parameters
| Type |
Name |
Description |
| int |
year |
|
| int |
month |
|
| int |
day |
|
Returns
View Source
DayStart(int, int, int)
Get the day start date and time in UTC
Declaration
public static DateTime DayStart(int year, int month, int day)
Parameters
| Type |
Name |
Description |
| int |
year |
|
| int |
month |
|
| int |
day |
|
Returns
View Source
Max(DateTime, DateTime)
Declaration
public static DateTime Max(DateTime left, DateTime right)
Parameters
Returns
View Source
Max(TimeSpan, TimeSpan)
Declaration
public static TimeSpan Max(TimeSpan left, TimeSpan right)
Parameters
Returns
View Source
Min(DateTime, DateTime)
Declaration
public static DateTime Min(DateTime left, DateTime right)
Parameters
Returns
View Source
Min(TimeSpan, TimeSpan)
Declaration
public static TimeSpan Min(TimeSpan left, TimeSpan right)
Parameters
Returns
View Source
MonthEnd(int, int)
Get the month end date in UTC
Declaration
public static DateTime MonthEnd(int year, int month)
Parameters
| Type |
Name |
Description |
| int |
year |
|
| int |
month |
|
Returns
View Source
MonthStart(int, int)
Get the month start date in UTC
Declaration
public static DateTime MonthStart(int year, int month)
Parameters
| Type |
Name |
Description |
| int |
year |
|
| int |
month |
|
Returns
View Source
Parse(string)
Declaration
public static DateTime? Parse(string dateValue)
Parameters
| Type |
Name |
Description |
| string |
dateValue |
The date value
|
Returns
| Type |
Description |
| DateTime? |
Valid date or null
|
View Source
YearEnd(int)
Get the year-end date in UTC
Declaration
public static DateTime YearEnd(int year)
Parameters
| Type |
Name |
Description |
| int |
year |
|
Returns
View Source
YearStart(int)
Get the year start date in UTC
Declaration
public static DateTime YearStart(int year)
Parameters
| Type |
Name |
Description |
| int |
year |
|
Returns