Class Date
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
Fields
DaysInWeek
Declaration
public static readonly int DaysInWeek
Field Value
FirstDayOfMonth
Declaration
public static readonly int FirstDayOfMonth
Field Value
FirstMonthOfCalendarYear
Declaration
public static readonly int FirstMonthOfCalendarYear
Field Value
LastMonthOfCalendarYear
Declaration
public static readonly int LastMonthOfCalendarYear
Field Value
MonthsInYear
Number of months in a year
Declaration
public static readonly int MonthsInYear
Field Value
Properties
MaxValue
Represents the largest possible value of a time instant
Declaration
public static DateTime MaxValue { get; }
Property Value
MinValue
Represents the smallest possible value of a time instant
Declaration
public static DateTime MinValue { get; }
Property Value
Now
Gets a time instant that is set to the current date and time
Declaration
public static DateTime Now { get; }
Property Value
Today
Gets a time instant that is set to the current day
Declaration
public static DateTime Today { get; }
Property Value
Tomorrow
Gets a time instant that is set to the next day
Declaration
public static DateTime Tomorrow { get; }
Property Value
Yesterday
Gets a time instant that is set to the previous day
Declaration
public static DateTime Yesterday { get; }
Property Value
Methods
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
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
Max(DateTime, DateTime)
Declaration
public static DateTime Max(DateTime left, DateTime right)
Parameters
Returns
Max(TimeSpan, TimeSpan)
Declaration
public static TimeSpan Max(TimeSpan left, TimeSpan right)
Parameters
Returns
Min(DateTime, DateTime)
Declaration
public static DateTime Min(DateTime left, DateTime right)
Parameters
Returns
Min(TimeSpan, TimeSpan)
Declaration
public static TimeSpan Min(TimeSpan left, TimeSpan right)
Parameters
Returns
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
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
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
|
YearEnd(int)
Get the year-end date in UTC
Declaration
public static DateTime YearEnd(int year)
Parameters
| Type |
Name |
Description |
| int |
year |
|
Returns
YearStart(int)
Get the year start date in UTC
Declaration
public static DateTime YearStart(int year)
Parameters
| Type |
Name |
Description |
| int |
year |
|
Returns