Click or drag to resize

GetAMExt Function

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

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION GetAMExt() 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. GetAMExt() returns the current setting for the extension identifying morning time strings (that is, those between 12:00:00 midnight and just before 12:00:00 noon).
A typical extension for morning time strings is "AM", which is how the function derives its name. The initial default for the morning extension is affected by SetInternational(), which you can refer to for more information.
Use SetAMExt() to change the value of this setting.
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