Default Century and Century Threshold
century threshold n
default century n
where n is a numeric entry (see below for more information)
These two configuration options control the century used when date-masked fields contain ‘ YY’ instead of ‘ YYYY’.
If a field is masked only with ‘ YY’ and not ‘ YYYY’, then the end-user cannot enter the century, and Zim assumes the century is 19. Application developers are strongly urged to either i) use ‘ YYYY’ to mask date fields, or ii) use the two configuration options to automatically increment the century for certain date ranges.
Note:The former approach always works, while the latter works for applications with well-defined input data that falls into certain date ranges.
The default century is a number from 0 to 99 that is copied to the century position of a date when the end-user can enter only two year digits. If the century threshold is -1, then this default century is used verbatim. If century threshold is on the range 0 to 99, then the default century is incremented if the year entered by the end-user is less than n. The table below gives examples of resulting dates given user input and the input mask of ‘MM/DD/ YY’:
|User Input||Default Century||Century Threshold||Resulting Date ( YYYYMMDD)|
In general, if your application must deal with widely-ranging dates, then use an input mask of ‘ YYYY’ to obtain expected results. However, if your application deals with dates of events occurring in the present, such as tagging orders with the order date, then an input mask of ‘ YY’ is sufficient, and set century threshold to a value, such as 50.
Valid Settings – Default Century
nn = numeric entry 0 to 99
Valid Settings – Century Threshold
nn = numeric entry -1 to 99