mirror of
https://github.com/jcampbell1/simple-file-manager.git
synced 2025-02-20 22:00:04 +01:00
Replacing month numbers with abbreviations to be a bit more international
This commit is contained in:
@@ -365,8 +365,9 @@ $(function(){
|
||||
return $html;
|
||||
}
|
||||
function formatTimestamp(unix_timestamp) {
|
||||
var m = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
var d = new Date(unix_timestamp*1000);
|
||||
return [d.getMonth()+1,'/',d.getDate(),'/',d.getFullYear()," ",
|
||||
return [m[d.getMonth()],' ',d.getDate(),', ',d.getFullYear()," ",
|
||||
(d.getHours() % 12 || 12),":",(d.getMinutes() < 10 ? '0' : '')+d.getMinutes(),
|
||||
" ",d.getHours() >= 12 ? 'PM' : 'AM'].join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user