1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 02:26:20 +02:00

show last updated time in more human way.

This commit is contained in:
Kushagra Gour
2016-11-27 09:06:26 +05:30
parent f82e64b369
commit 88e27f0d8f
3 changed files with 11 additions and 1 deletions

View File

@ -88,11 +88,20 @@
}
}
function getHumanDate(timestamp) {
var d = new Date(timestamp);
var retVal = d.getDate() + ' '
+ [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'][d.getMonth()] + ' '
+ d.getFullYear();
return retVal;
}
window.utils = {
semverCompare: semverCompare,
generateRandomId: generateRandomId,
onButtonClick: onButtonClick,
addInfiniteLoopProtection: addInfiniteLoopProtection,
getHumanDate: getHumanDate,
log: log
};
})();