Fix timestamp display
This commit is contained in:
parent
fea1d1c7b9
commit
95c6c7859f
11
src/App.vue
11
src/App.vue
|
@ -2717,17 +2717,6 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
// Format a datetime nicely for chat timestamp.
|
||||
prettyDate(date) {
|
||||
if (date == undefined) return '';
|
||||
let hours = date.getHours(),
|
||||
minutes = String(date.getMinutes()).padStart(2, '0'),
|
||||
ampm = hours >= 11 ? "pm" : "am";
|
||||
|
||||
let hour = hours % 12 || 12;
|
||||
return `${(hour)}:${minutes} ${ampm}`;
|
||||
},
|
||||
|
||||
// CSS classes for the profile button (color coded genders)
|
||||
profileButtonClass(user) {
|
||||
// VIP background.
|
||||
|
|
|
@ -156,7 +156,7 @@ export default {
|
|||
if (date == undefined) return '';
|
||||
let hours = date.getHours(),
|
||||
minutes = String(date.getMinutes()).padStart(2, '0'),
|
||||
ampm = hours >= 11 ? "pm" : "am";
|
||||
ampm = hours >= 12 ? "pm" : "am";
|
||||
|
||||
let hour = hours % 12 || 12;
|
||||
return `${(hour)}:${minutes} ${ampm}`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user