blob: abdb9836f2c5342e0e868c29b6e1e923d9c0d7c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
export class Util{
// Time formatting milliseconds to normal
dateformater(vmstime) {
if (!vmstime) {
return ''
}
let mstime = Number((vmstime + '').slice(0, 13));
let time = new Date(mstime);
let year = time.getFullYear();
let month = time.getMonth() + 1;
let day = time.getDate();
let hours = time.getHours();
let minutes = time.getMinutes();
let seconds = time.getSeconds();
let formattime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
return formattime;
}
}
|