Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
parse ( string dateTime ) : DateTime? |
public date ( string dateTime ) : string | ||
dateTime | string | The date-time string to parse. |
return | 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. |
return | string |
public day ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |
public difference ( string dateTime1, string dateTime2 ) : int | ||
dateTime1 | string | The first date |
dateTime2 | string | The second date |
return | 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'. |
return | int |
public hour ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |
public minute ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |
public month ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |
public nearestWeekday ( string dateTime, byte weekDay ) : string | ||
dateTime | string | The date-time string to parse. |
weekDay | byte | The week day. |
return | 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. |
return | string |
public quarter ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |
public second ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |
public time ( string dateTime ) : string | ||
dateTime | string | The date-time string to parse. |
return | 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. |
return | string |
public year ( string dateTime ) : int | ||
dateTime | string | The date-time string to parse. |
return | int |