Date handling

Question: "If the date of birth is 01-12 our customers software sometimes changes the date into 12-01"

This is related to your OS locale and date format and the way your SW handles dates. Also it is different depending on where you get this text field value from: visual/MRZ text result or from lexical analysis result:

  1. Visual zone and MRZ results contain characters as they were read from the document (for example: 24 09 1982 from visual zone and 820924 from MRZ)
  2. Lexical result is formatted according to your system locale (could be MM/dd/yyyy for USA locale, dd.MM.yyyy for most european locales, or your user-defined locale, e.g. yyyy-MM-dd). 

It is highly recommended to use lexical analysis results, because they are:

  1. formatted according to your locale.
  2. contain century for dates and you don't have to worry about them (for example: 820924 becomes 24.09.1982, and 230709 becomes 09.07.2023).

And a piece of advise: customer SW shall handle dates in user locale format as well to prevent misunderstanding.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.

Articles in this section

See more