Click or drag to resize

GetPMExt Function

X#
Returns a string representing the evening extension for time strings in 12-hour format.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION GetPMExt() AS STRING
Request Example View Source

Return Value

Type: String
Remarks
Time strings formatted using the 12-hour time format have an extension to specify if the time is in the morning or the evening. GetPMExt() returns the current setting for the extension identifying evening time strings (that is, those between 12:00:00 noon and just before 12:00:00 midnight).
A typical extension for evening time strings is "PM", which is how the function derives its name. The initial default for the evening extension is affected by SetInternational(), which you can refer to for more information.
Use SetPMExt() to change the value of this setting.
Tip Tip
If SetInternational(#Windows) is in effect, the evening extension is also displayed as part of the 24-hour time format.
This is a Windows standard that is not specific to X#.
Examples
This example turns on the SetInternational() flag, causing the time string extensions to be determined by International settings in the Windows Control Panel:
X#
1SetInternational(#Windows)
2? GetAMExt()            // Return value varies between systems
3? GetPMExt()            // Typically, AM and PM are displayed
See Also