Свойство | Type | Description | |
---|---|---|---|
MaxTimeSpan | System.TimeSpan | ||
UnixEpoch | System.DateTime |
Méthode | Description | |
---|---|---|
ParseMiniTimeSpan ( [ text ) : System.TimeSpan |
Parses the given string as a TimeSpan in compact representation. Throws exceptions on failure.
|
|
ParseMiniTimespan ( [ text ) : System.TimeSpan |
Parses the given string as a TimeSpan in compact representation. Throws exceptions on failure.
|
|
ToDateTime ( long timestamp ) : System.DateTime |
Creates a DateTime from a UTC Unix Timestamp.
|
|
ToDateTime ( this timestamp ) : System.DateTime |
Creates a DateTime from a Utc Unix Timestamp.
|
|
ToDateTime ( this str, System.DateTime &result ) : bool |
Tries to create a DateTime from a string containing a Utc Unix Timestamp. If the string was empty, returns false and does not affect result.
|
|
ToDateTimeLegacy ( this str, System.DateTime &result ) : bool | ||
ToSeconds ( this time ) : long | ||
ToSecondsString ( this time, [ sb ) : void |
Serializes the given TimeSpan to the given StringBuilder, as the number of seconds.
|
|
ToTickString ( this time, StringBuilder sb ) : StringBuilder | ||
ToTimeSpan ( [ str, System.TimeSpan &result ) : bool |
Tries to create a TimeSpan from a string containing the number of seconds. If the string was empty, returns false and sets result to TimeSpan.Zero
|
|
ToTimeSpanLegacy ( this str, System.TimeSpan &result ) : bool | ||
ToUnixTime ( this date ) : long |
Converts a DateTime to UTC Unix Timestamp.
|
|
ToUnixTimeString ( this date, StringBuilder sb ) : StringBuilder |
Appends a Utc Unix Timestamp to the given StringBuilder. If the date equals DateTime.MinValue, nothing is appended.
|
|
TryParseDateTime ( long timestamp ) : System.DateTime |
Creates a DateTime from a UTC Unix Timestamp.
|
|
TryParseDateTime ( [ str, System.DateTime &result ) : bool |
Tries to create a DateTime from a string containing a Utc Unix Timestamp. If the string was empty, returns false and does not affect result.
|
|
TryParseMiniTimeSpan ( [ text, System.TimeSpan &result ) : bool |
Attempts to parse the given string as a TimeSpan in compact representation. No exception is thrown if parsing failed.
|
|
TryParseMiniTimespan ( [ text, System.TimeSpan &result ) : bool |
Attempts to parse the given string as a TimeSpan in compact representation. No exception is thrown if parsing failed.
|
|
TryParseMiniTimespan ( this text, System.TimeSpan &result ) : bool | ||
TryParseTimeSpan ( [ str, System.TimeSpan &result ) : bool |
Tries to create a TimeSpan from a string containing the number of seconds. If the string was empty, returns false and sets result to TimeSpan.Zero
|
Méthode | Description | |
---|---|---|
DateTimeUtil ( ) : System | ||
ToCompactString ( this date ) : string | ||
ToDateTimeLegacy ( long timestamp ) : System.DateTime | ||
ToDateTimeLegacy ( [ str, System.DateTime &result ) : bool | ||
ToMiniString ( this span ) : string | ||
ToSecondsString ( this time ) : string | ||
ToTickString ( this time, [ sb ) : StringBuilder | ||
ToTickString ( this time ) : string | ||
ToTimeSpanLegacy ( [ str, System.TimeSpan &result ) : bool | ||
ToUnixTimeLegacy ( this date ) : long | ||
ToUnixTimeString ( this date, [ sb ) : StringBuilder | ||
ToUnixTimeString ( this date ) : string | ||
TryParseLocalDate ( [ dateString, System.DateTime &date ) : bool |
public static ParseMiniTimeSpan ( [ text ) : System.TimeSpan | ||
text | [ | String to parse. |
Résultat | System.TimeSpan |
public static ParseMiniTimespan ( [ text ) : System.TimeSpan | ||
text | [ | String to parse. |
Résultat | System.TimeSpan |
public static ToDateTime ( long timestamp ) : System.DateTime | ||
timestamp | long | |
Résultat | System.DateTime |
public static ToDateTime ( this timestamp ) : System.DateTime | ||
timestamp | this | |
Résultat | System.DateTime |
public static ToDateTime ( this str, System.DateTime &result ) : bool | ||
str | this | |
result | System.DateTime | |
Résultat | bool |
public static ToDateTimeLegacy ( this str, System.DateTime &result ) : bool | ||
str | this | |
result | System.DateTime | |
Résultat | bool |
public static ToSeconds ( this time ) : long | ||
time | this | |
Résultat | long |
public static ToSecondsString ( this time, [ sb ) : void | ||
time | this | TimeSpan to serialize. |
sb | [ | StringBuilder to which time will be saved. |
Résultat | void |
public static ToTickString ( this time, StringBuilder sb ) : StringBuilder | ||
time | this | |
sb | StringBuilder | |
Résultat | StringBuilder |
public static ToTimeSpan ( [ str, System.TimeSpan &result ) : bool | ||
str | [ | |
result | System.TimeSpan | |
Résultat | bool |
public static ToTimeSpanLegacy ( this str, System.TimeSpan &result ) : bool | ||
str | this | |
result | System.TimeSpan | |
Résultat | bool |
public static ToUnixTime ( this date ) : long | ||
date | this | |
Résultat | long |
public static ToUnixTimeString ( this date, StringBuilder sb ) : StringBuilder | ||
date | this | |
sb | StringBuilder | |
Résultat | StringBuilder |
public static TryParseDateTime ( long timestamp ) : System.DateTime | ||
timestamp | long | |
Résultat | System.DateTime |
public static TryParseDateTime ( [ str, System.DateTime &result ) : bool | ||
str | [ | |
result | System.DateTime | |
Résultat | bool |
public static TryParseMiniTimeSpan ( [ text, System.TimeSpan &result ) : bool | ||
text | [ | String to parse. |
result | System.TimeSpan | Parsed TimeSpan. Set to TimeSpan.Zero if parsing failed. |
Résultat | bool |
public static TryParseMiniTimespan ( [ text, System.TimeSpan &result ) : bool | ||
text | [ | String to parse. |
result | System.TimeSpan | Parsed TimeSpan. Set to TimeSpan.Zero if parsing failed. |
Résultat | bool |
public static TryParseMiniTimespan ( this text, System.TimeSpan &result ) : bool | ||
text | this | |
result | System.TimeSpan | |
Résultat | bool |
public static TryParseTimeSpan ( [ str, System.TimeSpan &result ) : bool | ||
str | [ | |
result | System.TimeSpan | |
Résultat | bool |
public static TimeSpan,System MaxTimeSpan | ||
Résultat | System.TimeSpan |