| DateTimeHelper Class |
Namespace: CMS.Helpers
public class DateTimeHelper : CoreMethods
The DateTimeHelper type exposes the following members.
| Name | Description | |
|---|---|---|
| DateTimeHelper |
| Name | Description | |
|---|---|---|
| DateTimeToString |
Converts the given DateTime to string value.
| |
| GetDayStart |
Gets start of the day of specific date.
| |
| GetFirstDayOfWeek |
Gets the first day of the week.
| |
| GetFirstDayOfWeek(String) |
Gets the first day of the week.
| |
| GetFormattedValidity |
Returns validity as formatted string.
| |
| GetHourStart |
Gets current date without minutes and seconds.
| |
| GetMinuteStart |
Gets current date without seconds.
| |
| GetMonthStart |
Gets the first day of the month from specific date.
| |
| GetValidityEnum |
Returns validity enumeration.
| |
| GetValidityString |
Returns validity enumeration as string.
| |
| GetValidTo |
Calculate valid to date and time according to given parameters.
| |
| GetWeekOfYear(DateTime) |
Gets the week of year number.
| |
| GetWeekOfYear(DateTime, String) |
Gets the week of year number.
| |
| GetWeekStart(DateTime) |
Gets the date from the beginning of week.
| |
| GetWeekStart(DateTime, String) |
Gets the date from the beginning of week.
| |
| GetYearStart |
Gets the first day of the year from specific date.
| |
| IsNowOrToday |
Returns true, if the given value is ##NOW## or ##TODAY## macro
| |
| IsValidFromTo |
Returns true if DateTime "from" is lower than or equal to DateTime "to" or one of them is equal to ZeroTime.
| |
| NumberOfWeeks(DateTime, DateTime) |
Gets number of weeks in specified time interval.
| |
| NumberOfWeeks(DateTime, DateTime, String) |
Gets number of weeks in specified time interval.
|
| Name | Description | |
|---|---|---|
| AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
| GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
| GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
| ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
| ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
| ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
| ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
| ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
| ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |
| Name | Description | |
|---|---|---|
| MACRO_DATE_TODAY |
Macro representing current date.
| |
| MACRO_TIME_NOW |
Macro representing current date and time.
| |
| UNIX_TIME_START |
Start date/time for the Unix time stamp
| |
| ZERO_TIME |
Zero time constant.
|
| Name | Description | |
|---|---|---|
| DefaultIFormatProvider |
Gets the default (en-us) IFormatProvider.
|