Wrong date parsing

We encountered a problem with the intrinsic lifetime field of ca_entities after updating to CA 1.7.8.

Our locale is set to german in setup.php:

if (!defined("__CA_DEFAULT_LOCALE__")) {
    define("__CA_DEFAULT_LOCALE__", "de_DE");

When entering lifetimes (only years, not actual dates like 1871/12/24) Providence, some dates are displayed as-is, like before the update, but others get parsed to strings like "spät 1900er - mitte 1980er" which means "late 1900s - mid 1980ies", even if you entered actual years.
See this Video example:

This happens for those kind of dates:

  1. If there is a 0 at the end of the first year and a 4 or 7 at the end of the second year (e.g. 1770 - 1827)
  2. If there is a 3 or a 6 at the end of the first year and a 4,7 or 9 at the end of the second date (e.g. 1863 - 1919 or 1756 - 1824))

so: xxx0 - xxx4/7, xxx3 - xxx4/7/9 and xxx6 - xxx4/7/9 are parsed this incorrect way.

In the datetime.conf I tried each dateFormat and different timeRangeConjunctions with no luck.
The expressions like "früh" are from app/lib/Parsers/TimeExpressionParser/de_DE.lang, and they may make sense in some contexts, but they should not alter specific dates.
Is this a known bug or a misconfiguration on our side? I’ll attach our datetime.conf.

Sign In or Register to comment.