Does Javascript not have any built in support for formatting dates? I have a date object, and I want to format it to a format of my choice e.g. the date that I want to convert is '2017-12-22'. Is there not any function that I could use
something like var newFormattedDate = new Date('2017-12-22', 'mm/dd/yyyy')
so that the output is 22/12/2017