Best Practice for Switching Between Date Formats

I am looking for a way to format and parse between the following common date formats (no changes)

  1. MySQL - yyyy-mm-dd for example 2016-12-21 in Java/JSP/GSP code and Velocity (HTML Form Entry)

  2. Date Picker - mm/dd/yyyy for example 02/28/2017 in Javascript

What functions are used to convert between the date formats and where are they stored so that they can be changed

In the new UI framework you can call ui.format(Date), this will use the date format specified as the value of the uiframework.formatter.dateAndTimeFormat or uiframework.formatter.dateFormat GPs, I’m not sure if this is what is used for HTML forms. In don’t think these are exposed for use in JS files

I believe Html Form Entry has a global property that its formatter uses as well. (But I could be wrong about that).

Unfortunately, off the top of I don’t know where the JS date format is set.

Take care, Mark