I feel like this could be a useful part of the regex pattern:
(\d{1,2}|\d{4}|[a-zA-Z]{3})
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.
regex101.com
and also that regex is going to become more and more unwieldy as you try to cover more and more variations, so that eventually you're going to end up using a B4X Sub to parse it, especially if you are also to handle
from-to- date ranges.
Are these dates coming from user input, or from a file?
Also what are the prefixes "cal" and "est"?
Is "cal" for "calendar", or for "calculate"?
The "est" reminds me of a book catalogue assignment at uni that needed to be able to represent approximate dates as well as actual dates.
With the prefixes, I'd be moving towards the VAX VMS CLI approach of recognising the minimum unique start of keywords, eg for the prefix "before" you'd also recognise "bef", "befo", "befor" and "before", and "after" would recognise "aft", "afte" and "after".
Same with the mmm representation for months - I have a vague recollection that some date formatting routines expect/emit "july" (not "jul") for July. And not that you're interpreting day-of-week (yet) but I have often seen Tuesday shortened to "tues" and less-often Thursday shortened to "thurs".
It's nice to have the shortened versions but it's also nice to let the user just type the whole prefix instead of having to remember the short versions.
Especially for "abt" which is not the first 3 letters of "about". "abt" is a good shortening, but it's one more thing to remember.