Метод | Описание | |
---|---|---|
date ( string dateTime ) : string |
Parses the specified dateTime as DateTime and returns only the date as string, formatted using the default date format
|
|
date ( string dateTime, string dateFormat ) : string |
Parses the specified dateTime as DateTime and returns only the date as string, formatted using the specified dateFormat.
|
|
day ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the day.
|
|
difference ( string dateTime1, string dateTime2 ) : int |
Returns the difference, in days, between dateTime1 and dateTime2.
|
|
difference ( string dateTime1, string dateTime2, string unit ) : int |
Returns the difference, in the specfied unit, between dateTime1 and dateTime2.
|
|
hour ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the hour.
|
|
minute ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the minute.
|
|
month ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the month.
|
|
nearestWeekday ( string dateTime, byte weekDay ) : string |
Gets the nearest date on which the specified weekDay occurs, starting from and including the date parsed from dateTime, and formatted using the default date format.
|
|
nearestWeekday ( string dateTime, byte weekDay, string dateFormat ) : string |
Gets the nearest date on which the specified weekDay occurs, starting from and including the date parsed from dateTime, and formatted using the specified dateFormat.
|
|
quarter ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the quarter.
|
|
second ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the second.
|
|
time ( string dateTime ) : string |
Parses the specified dateTime as DateTime and returns only the time as string, formatted using the default time format
|
|
time ( string dateTime, string timeFormat ) : string |
Parses the specified dateTime as DateTime and returns only the date as string, formatted using the specified timeFormat.
|
|
year ( string dateTime ) : int |
Parses the specified dateTime as DateTime and returns the year.
|
Метод | Описание | |
---|---|---|
parse ( string dateTime ) : DateTime? |
public date ( string dateTime ) : string | ||
dateTime | string | The date-time string to parse. |
Результат | string |
public date ( string dateTime, string dateFormat ) : string | ||
dateTime | string | The date-time string to parse. |
dateFormat | string | The string that specifies how to format the resulting date string. |
Результат | string |
public day ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |
public difference ( string dateTime1, string dateTime2 ) : int | ||
dateTime1 | string | The first date |
dateTime2 | string | The second date |
Результат | int |
public difference ( string dateTime1, string dateTime2, string unit ) : int | ||
dateTime1 | string | The first date |
dateTime2 | string | The second date |
unit | string | The unit in which to return the difference. Valid values are 'days', 'weeks', 'months' /// and 'years'. |
Результат | int |
public hour ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |
public minute ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |
public month ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |
public nearestWeekday ( string dateTime, byte weekDay ) : string | ||
dateTime | string | The date-time string to parse. |
weekDay | byte | The week day. |
Результат | string |
public nearestWeekday ( string dateTime, byte weekDay, string dateFormat ) : string | ||
dateTime | string | The date-time string to parse. |
weekDay | byte | The week day. |
dateFormat | string | The string that specifies how to format the resulting date string. |
Результат | string |
public quarter ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |
public second ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |
public time ( string dateTime ) : string | ||
dateTime | string | The date-time string to parse. |
Результат | string |
public time ( string dateTime, string timeFormat ) : string | ||
dateTime | string | The date-time string to parse. |
timeFormat | string | The string that specifies how to format the resulting time string. |
Результат | string |
public year ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
Результат | int |