Year validation checks

0
I have a datetime attribute in Mendix 4.3.2 in an entity that the user can fill in. When filling in a wrong month like 13 a validation is showed. When making a mistake at the year like 0201 instead of 2001 no error is showed. Even year 0500 is possible. Some year are converted automatically like 0001 into 2001. Is this a bug or is it on purpose not handled in the validation?
asked
1 answers
0

I would think this is at least partly intended, since years 201, 500 and 1 can be valid dates (although long ago). But automatically converting 0001 to 2001, but not 0201 to 2201 seems inconsistent.

*Edit: Experimentally found: currently

  • Every year between '00' and '33' is converted to '20xx'.
  • Everything between '34' and '99' is converted to '19xx'.
  • Everything with leading zeroes is converted according to the above, but subject to the below.
  • Entering a single digit is always incorrect.
  • Entering with 5 digits is always incorrect.
  • Everything above 100 is a year by itself.
answered