The underlying algorithm for both the numeric and character methods follow
the approach described in Hinnant (2021) for calculating days from the
UNIX Epoch from Gregorian Calendar dates.
The character version parses inputs in a fixed, year, month and day order.
These values must be digits but can be separated by any non-digit character.
It is similar in spirit to that of Simon Urbanek's fastDate()
implementation in that we use pure text parsing and no system calls.
fymd() differs from fastDate() in that it
validates all dates for correctness and supports a a much larger range of
dates (i.e. the
Proleptic Gregorian calendar.
This additional capability does come with a small performance cost but, IMO,
remains competetive.
For both numeric and character versions years must be in the range
[-9999, 9999].