[This is preliminary documentation and is subject to change.]
[Missing <summary> documentation for "T:fCraft.DateTimeUtil"]
Assembly: fCraft (in fCraft.dll) Version: 0.6.2.4 (0.6.2.4)
Syntax
| C# |
public static class DateTimeUtil
Members
| All Members | Fields | Methods |
| Member | Description | |
|---|---|---|
| MaxTimeSpan | ||
| ParseMiniTimespan(String) | ||
| TicksToUnixEpoch | ||
| ToCompactString(DateTime) | ||
| ToCompactString(TimeSpan) | ||
| ToDateTime(Int64) | Creates a DateTime from a Utc Unix Timestamp. | |
| ToDateTime(String, DateTime%) | 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(Int64) | ||
| ToDateTimeLegacy(String, DateTime%) | ||
| ToMiniString(TimeSpan) | ||
| ToSeconds(TimeSpan) | ||
| ToTickString(TimeSpan) | Converts a TimeSpan to a string containing the number of seconds.
If the timestamp is zero seconds, returns an empty string. | |
| ToTickString(TimeSpan, StringBuilder) | ||
| ToTimeSpan(String, TimeSpan%) | 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(String, TimeSpan%) | ||
| ToUnixTime(DateTime) | Converts a DateTime to Utc Unix Timestamp. | |
| ToUnixTimeLegacy(DateTime) | ||
| ToUnixTimeString(DateTime) | Converts a DateTime to a string containing the Utc Unix Timestamp.
If the date equals DateTime.MinValue, returns an empty string. | |
| ToUnixTimeString(DateTime, StringBuilder) | Appends a Utc Unix Timestamp to the given StringBuilder.
If the date equals DateTime.MinValue, nothing is appended. | |
| TryParseLocalDate(String, DateTime%) | Tries to parse a data in a culture-specific ways.
This method is, unfortunately, necessary because in versions 0.520-0.522,
fCraft saved dates in a culture-specific format. This means that if the
server's culture settings were changed, or if the PlayerDB and IPBanList
files were moved between machines, all dates became unparseable. | |
| TryParseMiniTimespan(String, TimeSpan%) | ||
| UnixEpoch |