-
- Downloads
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).
exec/tests/user/birthdate.js
0 → 100644
Please register or sign in to comment