Skip to content
Snippets Groups Projects
Commit 915bd7c7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Refactor the birthdate parsing logic, add unit test

The birthdate parsing is now a lot more robust and will recognize all kinds
of variants/formats and use range checks to disambiguate provided dates and
even support partial dates (e.g. year only, year/month and month/year).

The tests should all pass regardless of what the sysop has set for their
system date format in SCFG.

I had considered using sscanf() for the parsing logic but ended up going with
strtoul() only and that seems to be working well (as reflected by the passing
test cases).
parent 44147ffd
No related branches found
No related tags found
No related merge requests found
Pipeline #7799 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment