[This is preliminary documentation and is subject to change.]

Provides utility functions for working with DateTime and TimeSpan.

Namespace: fCraft
Assembly: fCraft (in fCraft.dll) Version: 0.6.3.2 (0.6.3.2)

Syntax

   
 C# 
public static class DateTimeUtil

Members

         
 All Members  Fields   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
MaxTimeSpan
ParseMiniTimespan(String)
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)
Returns the number of seconds in a TimeSpan, rounded down.
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.
TryParseMiniTimespan(String, TimeSpan%)
UnixEpoch
UTC Unix epoch (1970-01-01, 00:00:00).

Inheritance Hierarchy

System..::..Object
  fCraft..::..DateTimeUtil

See Also