JSFiddle - React, Tailwind, and code Playground
by godhong
HTML
<script src="https://raw.github.com/kensnyder/date-prototype/master/src/Date.js"></script>
JavaScript
var raw = "Sun Jan 01 1961 00:00:00 GMT-0500 (Eastern Standard Time)";
var raw_s = raw.split(" ");
var new_s = raw_s.slice(1,4);
var mydate = $D(new_s.join(" "));
var month_pool = [" 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10", "11", "12"]
var month = month_pool[mydate.getMonth()];
var date = [" 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"][mydate.getDate()-1];
var str = month + '/' + date+ '/' + mydate.getFullYear();
console.log(new_s, mydate, month, date, str)
var tt = raw_s.slice(2,4);