I’d do the same for a11y an internationalization purposes - however this is juts a bad implementation of it from an americans perspective.
You’d change seperators and position if you truly wanted to do this right
Its basic date wrangling and tbh i see nothing malfeasant here
Its basically yyyy/mm/dd yy/M/d mm-dd-yyyy stuff but suuuuper lazily done