} // PrepareLocalAndUTCTimes #endregion // Public Methods #region Private Static Methods private static string FormatTheTime ( DateTime pdtmTheTime , DateFieldOrder penmDateFieldOrder , HoursFormatType penmHoursFormatType , TimePrecisionType penmTimePrecisionType , bool pfShowTimeZone , bool pfShowWeekdayName , bool pfShowAmPmAsUC ) { string strFormattedCalendarDate = FormatCalendarDate ( pdtmTheTime , penmDateFieldOrder ); string strFormattedTimeOfDay = FormatTimeOfDay ( pdtmTheTime , penmHoursFormatType , penmTimePrecisionType , pfShowAmPmAsUC ); return string.Format ( FMT_DATE_AND_TIME , // Message Template new string [ ]{ FormatWeekdayNameDisplay( pdtmTheTime , pfShowWeekdayName ) , // Token 0 strFormattedCalendarDate , // Token 1 strFormattedTimeOfDay, // Token 2 FormatTimeZoneDisplay( pdtmTheTime , pfShowTimeZone)} ); // Token 3 } // EFormatTheTime
} // EFormatTheTime private static string FormatCalendarDate ( DateTime pdtmTheTime , DateFieldOrder penmDateFieldOrder ) { if ( penmDateFieldOrder == DateFieldOrder.CultureInfoShortDate ) return pdtmTheTime.ToShortDateString ( ); else return string.Format ( _astrCalDateFormats [ ( int ) penmDateFieldOrder ] , // Message Template new string [ ] { pdtmTheTime.Month.ToString ( TOSTRING_MDHMS ) , // Token 0 pdtmTheTime.Day.ToString ( TOSTRING_MDHMS ) , // Token 1 ( ( int ) ( ( pdtmTheTime.Year ) / 100 ) ).ToString ( TOSTRING_MDHMS) , // Token 2 ( ( int ) ( ( pdtmTheTime.Year ) % 100 ) ).ToString ( TOSTRING_MDHMS ) } ); // Token 3 } // FormatCalendarDate