I have some JSON that returns a simple date which I am placing in a DIV...
let movieDate = data.release_date;
document.getElementById('movie-date').innerHTML = movieDate;
The output is returned like this...
2021-07-14
I need to change this output to display in two different formats...
- 14 June 2021
- 2021
Is there a simple way to do this?