I need a locale-based parser for string to Date. I have explored for solutions (both library or custom) but all I found are either assuming a fixed locale, or Date -> string which is fairly easier.
Example:
parse('1/2/2021', 'en-US') // must print Date object as "Sat Jan 02 2021 00:00:00 GMT+0530"
parse('1/2/2021', 'en-IN') // must print Date object as "Mon Feb 01 2021 00:00:00 GMT+0530"
Note that depending on the locale argument, 1 is parsed as a month (for US locale) or as day (for IN locale)