Default Century and Century Threshold

Default Century and Century Threshold

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

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 InputDefault CenturyCentury ThresholdResulting Date ( YYYYMMDD)
12/12/9419-119941212
12/12/9420-120941212
12/12/01193020011212
12/12/35193019351212
12/12/35203020351212

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

Windows-1
UNIX-1

Valid Settings – Century Threshold

nn = numeric entry -1 to 99

Windows19
UNIX19

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish