C# Class Smrf.DateTimeLib.DateTimeUtil2

Static utility methods involving dates and times.
This is a replacement for DateTimeUtil, which should not be used in new projects.
显示文件 Open project: 2014-sed-team3/term-project

Public Methods

Method Description
FormatDuration ( System.TimeSpan period ) : String
FromCultureInvariantString ( String cultureInvariantString ) : System.DateTime
RemoveTime ( System.DateTime dateTime ) : System.DateTime
ToCultureInvariantFileName ( System.DateTime dateTime ) : String
ToCultureInvariantString ( System.DateTime dateTime ) : String
UnixTimestampToDateTimeUtc ( UInt32 unixTimestampUtc ) : System.DateTime

Private Methods

Method Description
AppendDurationComponent ( Int32 iComponent, String sComponentDescription, System.Boolean bAlwaysAppend, StringBuilder oDuration ) : System.Boolean

Method Details

FormatDuration() public static method

public static FormatDuration ( System.TimeSpan period ) : String
period System.TimeSpan
return String

FromCultureInvariantString() public static method

public static FromCultureInvariantString ( String cultureInvariantString ) : System.DateTime
cultureInvariantString String
return System.DateTime

RemoveTime() public static method

public static RemoveTime ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime
return System.DateTime

ToCultureInvariantFileName() public static method

public static ToCultureInvariantFileName ( System.DateTime dateTime ) : String
dateTime System.DateTime
return String

ToCultureInvariantString() public static method

public static ToCultureInvariantString ( System.DateTime dateTime ) : String
dateTime System.DateTime
return String

UnixTimestampToDateTimeUtc() public static method

public static UnixTimestampToDateTimeUtc ( UInt32 unixTimestampUtc ) : System.DateTime
unixTimestampUtc System.UInt32
return System.DateTime