Method | Description | |
---|---|---|
FormatCurrentTime ( ) : string |
Format the current time.
|
|
FormatThisTime ( DateTime pdtmThisTime ) : string |
Format the specified time.
|
|
GetTimeZoneForTime ( DateTime pdtmTheTime ) : string |
Return the time zone name that corresponds to a local time.
|
|
PrepareLocalAndUTCTimes ( DateTime dtmTimeLocal, DateTime dtmTimeUtc ) : string |
Given a pair of DateTime structures, return them in a standardized format.
|
|
TimeDisplayFormatter ( ) : System |
The default constructor initializes an instance that follows the default preferences built into the class. Hence, methods called on objects created by it are guaranteed to yield a usable string unless the DateTime value supplied to the method is, itself, invalid. Rather than attempt to create the numerous constructors that would be required to cover every possible combination of properties, there is just one constructor. All properties are read-write. Use them to change the operating parameters. If you always use the same combination of settings, you can wrap your own class around an instance of this one. |
Method | Description | |
---|---|---|
FormatAMPMToken ( DateTime pdtmTheTime, HoursFormatType penmHoursFormatType, bool pfShowAmPmAsUC ) : string | ||
FormatCalendarDate ( DateTime pdtmTheTime, DateFieldOrder penmDateFieldOrder ) : string | ||
FormatTheTime ( DateTime pdtmTheTime, DateFieldOrder penmDateFieldOrder, HoursFormatType penmHoursFormatType, TimePrecisionType penmTimePrecisionType, bool pfShowTimeZone, bool pfShowWeekdayName, bool pfShowAmPmAsUC ) : string | ||
FormatTimeOfDay ( DateTime pdtmTheTime, HoursFormatType penmHoursFormatType, TimePrecisionType penmTimePrecisionType, bool pfShowAmPmAsUC ) : string | ||
FormatTimeTokenHour ( DateTime pdtmTheTime, HoursFormatType penmHoursFormatType ) : string | ||
FormatTimeTokenMilliseconds ( DateTime pdtmTheTime, TimePrecisionType penmTimePrecisionType ) : string | ||
FormatTimeTokenSeconds ( DateTime pdtmTheTime, TimePrecisionType penmTimePrecisionType ) : string | ||
FormatTimeZoneDisplay ( DateTime pdtmTheTime, bool pfShowTimeZone ) : string | ||
FormatWeekdayNameDisplay ( DateTime pdtmTheTime, bool pfShowWeekdayName ) : string | ||
FromatTimeTokenTicks ( DateTime pdtmTheTime, TimePrecisionType penmTimePrecisionType ) : string | ||
InvalidEnumArgValueMessage ( string pstrName, int pintSpecifiedValue ) : string | ||
InvalidEnumValueMessage ( string pstrName, int pintSpecifiedValue, int pintCurrentValue ) : string |
public FormatThisTime ( DateTime pdtmThisTime ) : string | ||
pdtmThisTime | DateTime | /// The DateTime instance to format. /// |
return | string |
public static GetTimeZoneForTime ( DateTime pdtmTheTime ) : string | ||
pdtmTheTime | DateTime | /// Specify the System.DateTime for which the correct time zone string /// is required. /// |
return | string |
public static PrepareLocalAndUTCTimes ( DateTime dtmTimeLocal, DateTime dtmTimeUtc ) : string | ||
dtmTimeLocal | DateTime | /// Specify the local time to include in the standardized message. /// |
dtmTimeUtc | DateTime | /// Specify the UTC time to include in the standardized message. /// |
return | string |