This command yields the control of the date and time formats from the developer to the end user, a goal we find laudable.
SET SYSFORMATS ON | OFF
cOnOrOff = SET( "SYSFORMATS" )
We think it's a good idea to let users choose the settings with which they are most comfortable. We should preserve their window positions, respect their color settings, and work with the screen resolution as configured. SET SYSFORMATS
has that attitude as well, yielding control of the date, currency, time and numeric formats to the Regional Options applet in the Windows Control Panel.
But it's very challenging to work in a system where you cannot determine the current settings. Generic date-parsing routines will have to be revised to more carefully manipulate the date setting, not to depend on switching and restoring SET DATE
. (Hint: If the setting of SYSFORMATS is ON and the DATE is SET to SHORT, you need to preserve and restore SET MARK TO
and/or turn on and off SYSFORMATS to parse the date.) Routines to automatically size a text box to fit the date cannot depend on SET("CENTURY"). A routine that sets data session-scoped commands (as all of these are) to the default data session settings cannot always determine what these commands are set to. This command is a good idea; we'll be pleased when tCENTURY and MARK are as functional as the rest.
SET SYSFORMATS ON
* In the Control Panel, set the short date to 'M/d/yy'
SET CENTURY ON
? SET("CENTURY") && "ON"
? DATE() && Yields a date in MM/DD/YY format.