dialob / dialob-parent

Apache License 2.0
1 stars 1 forks source link

birthDateFromHetu() function needs update #78

Closed vahurkrouverk closed 2 months ago

vahurkrouverk commented 10 months ago

Finland introduced new separators for personal identity codes in December 2023 https://dvv.fi/en/reform-of-personal-identity-code

This means that function iio.dialob.rule.parser.function.DefaultFunctions.birthDateFromHetu(String) implementation needs updates to calculate age correctly.

Tatuk commented 10 months ago

@vahurkrouverk I tried and seems to work...at least in here https://demo.dialob.io/fill/bbbe1792a54b7ced8a726ead5fcde6fd using https://telepartikkeli.azurewebsites.net/tunnusgeneraattori to create test Hetu´s..

patope commented 10 months ago

No.. This change is about how birthdate is calculated. Current birthDateFromHetu interprets 010101B001A as 1.1.2101, but after this change it should be 1.1.2001.

vahurkrouverk commented 10 months ago

Title is bit misleading, forgot to fix it, isHetu works OK, problem is only in bith date calculation.