Convert unix timestamp to localized date string on manage room page

master
Daniel Berteaud 11 years ago
parent 94d186045e
commit 3a6106aac4
  1. 14
      public/js/vroom.js

@ -224,6 +224,12 @@ function getTime(){
return hours + ':' + minutes + ':' + seconds;
}
// Convert a timestamp to readable date
function timeStamp2Date(sec){
var d = new Date(sec*1000);
return d.toLocaleString();
}
// Temporarily suspend a button, prevent abuse
function suspendButton(el){
$(el).attr('disabled', true);
@ -302,6 +308,14 @@ function initIndex(){
});
}
// Used on the management page
function initManage(){
// Replace timestamps with a readable date
$('.timeStamp').each(function(){
$(this).html(timeStamp2Date(parseInt($(this).html())));
});
}
// This is the main function called when you join a room
function initVroom(room) {

Loading…
Cancel
Save