My backend is built using java and the user settings API returns datetime formats to use within the view using Java standards (datetimes are later returned in ISO8601 and formatted on the fly). Example in Java 'yyyy-MM-dd' should be converted to 'YYYY-MM-DD' to be used with javascript's library momentjs.
Is there a direct way to convert symbols from java to javascript libraries (momentjs or date-fns)?