JSFiddle - React, Tailwind, and code Playground

by techie bala

HTML

<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<span class="date">06-Aug-2012</span>
<span class="date">2012/06/Aug</span>
<span class="date">Monday, August 06, 2012</span>

JavaScript

/* Date format convert - jQuery UI */

$(document).ready(function () {
 	var c = "";
    $('span.date').each(function() { 
        var dateFormat = $(this).text()
        var dateFormat = $.datepicker.formatDate('MM dd, yy', new Date(dateFormat));
        //alert(dateFormat);
        $(this).html(dateFormat + "<br>");
    });
});