Template:Benefits of $Sir Datexxx datetime processing
Jump to navigation
Jump to search
SPANSIZE | The SPANSIZE processing creates a very strong barrier to detecting otherwise unnoticed two-digit year processing errors. |
---|---|
Relative CENTSPAN | The relative CENTSPAN specification (for example, -50 ) lets you maintain a flexible "rolling" window for two-digit year processing. |
Default CENTSPAN | One significant advantage of a relative CENTSPAN is that it allows the default (1990 for $Web_Date2xx functions without a format, and -50 otherwise) of a reasonable value without parameter changes in all batch and Online jobs. |
Format tokens | There is a very large set of tokens in the Sir2000 and $SirDatexxx datetime formats. For example, there are four different tokens representing the day of the week, and time of day can be represented. Standard SOUL date formats do not have any day-of-week or time-of-day tokens, and other standard SOUL token variations, for example, CYY versus ZYY, are done by a complex argument setting. |
Pattern match tokens | The Sir2000 and $SirDatexxx datetime formats can contain single-character (I ) or variable-length character (* ) match-any tokens in datetime formats. For example, you can specify that a string has an embedded year, and you can process that year as a date. |
Format-free representations | Non-string datetime values allow you to pass around dates simply as numbers, without the complexities of carrying the corresponding string format (you only need to establish the scale to operate on a value). |
Operating on numeric representations | Numeric date values can be operated on directly with SOUL, especially allowing you to add datetime differences (for example, + ), rather than calling a $DateChg $function and providing a format. |
Time | All Sir2000 and $SirDatexxx datetime $functions allow any reference to a "date" to include time of day. The only standard SOUL datetime $function that provides a time of day is $Time, the current time of day, in one fixed format. |
$Sir_Date formats | $Sir_Date lets you specify any format to return the current date and time. $Date has only a few numeric codes for a few formats. |
Error control arguments | Sir2000 User Language Tools provides error handling control that applies to all datetime $functions, including standard SOUL. Additionally, the Sir2000 and $SirDatexxx datetime $functions (except $Sir_DateFmt) let you specify error control for a single $function invocation. |
Error values of numeric date $functions | The $functions that use non-string datetime values provide very uniform error return values: -9.E12 or a null string, for numeric or string result $functions, respectively. |