Свойство | Type | Description | |
---|---|---|---|
RSD_TOKENS | string[] |
Méthode | Description | |
---|---|---|
FormatDateForShow ( DateTime pdtmTestDate ) : string |
Use my standard format string for displaying date stamps in reports, to format a DateTime structure.
|
|
FormatDateTimeForShow ( DateTime pdtmTestDate ) : string |
Use my standard format string for displaying date/time stamps in reports, to format a DateTime structure.
|
|
FormatTimeForShow ( DateTime pdtmTestDate ) : string |
Use my standard format string for displaying time stamps in reports, to format a DateTime structure.
|
|
GetDisplayTimeZone ( DateTime pdtmTestDate, string pstrTimeZoneID, bool pfAbbreviateTZName = false ) : string |
Given a DateTime and a system time zone ID string, return the appropriate text to display, depending on whether the specified time is standard or Daylight Saving Time. if in doubt, use TimeZoneInfo.GetSystemTimeZones to enumerate the time zones installed on the local machine. Invalid time zone strings always give rise to one of a number of exceptions, all of which are fully described in the documentation of a companion function, GetSystemTimeZoneInfo which this routine uses to get the time zone information that it needs. |
|
GetSystemTimeZoneInfo ( string pstrTimeZoneID ) : TimeZoneInfo |
Given a system time zone ID string, return the corresponding TimeZoneInfo object if the specified time zone is defined on the local system. if in doubt, use TimeZoneInfo.GetSystemTimeZones to enumerate the time zones installed on the local machine. |
|
ReformatNow ( string pstrFormat ) : string |
This method has a nearly exact analogue in the constellations of WIL User Defined Functions that gave rise to its immediate predecessor, a like named function implemented in straight C, with a little help from the Windows National Language Subsystem, which underlies the CultureInfo class.
|
|
ReformatSysDate ( DateTime pdtmToFormat, string pstrFormat ) : string |
ReformatSysDate is the core function of the constellation of routines that grew from the original WIL script. Substitution tokens drive construction of a formatted date string.
|
|
ReformatUtcNow ( string pstrFormat ) : string |
In the original constellation of WinBatch functions and their C descendants, this function took the form of an optional argument to ReformatNow. I think I prefer this way.
|
Méthode | Description | |
---|---|---|
EstimateFinalLength ( string &pstrFormat ) : int | ||
SysDateFormatters ( ) : System |
public static FormatDateForShow ( DateTime pdtmTestDate ) : string | ||
pdtmTestDate | DateTime | /// Specify the populated DateTime to be formatted. Since only the date /// goes into the format, the time component MAY be uninitialized. /// |
Résultat | string |
public static FormatDateTimeForShow ( DateTime pdtmTestDate ) : string | ||
pdtmTestDate | DateTime | /// Specify the populated DateTime to be formatted. Since the date and /// time go into the output string, the entire structure must be /// initialized. /// |
Résultat | string |
public static FormatTimeForShow ( DateTime pdtmTestDate ) : string | ||
pdtmTestDate | DateTime | /// Specify the populated DateTime to be formatted. Since only the time /// goes into the format, the date component MAY be uninitialized. /// |
Résultat | string |
public static GetDisplayTimeZone ( DateTime pdtmTestDate, string pstrTimeZoneID, bool pfAbbreviateTZName = false ) : string | ||
pdtmTestDate | DateTime | /// Specify the Syatem.DateTime for which the appropriate time zone /// string is required. Both DateTime.MinValue and DateTime.MaxValue are /// invalid; specifying either elicits the empty string. /// |
pstrTimeZoneID | string | /// Specify a valid time zone ID string. Please see the Remarks. /// |
pfAbbreviateTZName | bool |
/// |
Résultat | string |
public static GetSystemTimeZoneInfo ( string pstrTimeZoneID ) : TimeZoneInfo | ||
pstrTimeZoneID | string | /// Specify a valid time zone ID string. There are two special IDs, /// LocalTime and UTC, both of which are accessible through static /// properties on the TimeZoneInfo class. Although you could use the ID /// properties with this method, the most efficient way to handle these /// special cases is by reference to the Local property for LocalTime /// and the UTC property for UTC time. (This method could take the same /// shortcut, but I decided that it wasn't worth the extra code and /// testing. /// |
Résultat | TimeZoneInfo |
public static ReformatNow ( string pstrFormat ) : string | ||
pstrFormat | string | /// This System.String is a combination of tokens and literal text that /// governs the formatting of the date. /// |
Résultat | string |
public static ReformatSysDate ( DateTime pdtmToFormat, string pstrFormat ) : string | ||
pdtmToFormat | DateTime | /// This System.DateTime is the time to be formatted. /// |
pstrFormat | string | /// This System.String is a combination of tokens and literal text that /// governs the formatting of the date. /// |
Résultat | string |
public static ReformatUtcNow ( string pstrFormat ) : string | ||
pstrFormat | string | /// This System.String is a combination of tokens and literal text that /// governs the formatting of the date. /// |
Résultat | string |