This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Would be ridiculous to pull in the entire moment.js library for this | |
window.moment = function(dateString) { | |
var date = new Date(dateString); | |
var format = function() { | |
return date.getFullYear() + '-' + | |
('0' + (date.getMonth() + 1)).slice(-2) + '-' + | |
('0' + date.getDate()).slice(-2); | |
}; |