Работа над HistoryPage
This commit is contained in:
@@ -16,4 +16,16 @@ export function hexToString(str) {
|
||||
result += String.fromCharCode(parseInt(str.substr(i, 2), 16));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function formatDate(d, format) {
|
||||
if (!format)
|
||||
format = 'normal';
|
||||
|
||||
switch (format) {
|
||||
case 'normal':
|
||||
return `${d.getDate().toString().padStart(2, '0')}.${(d.getMonth() + 1).toString().padStart(2, '0')}.${d.getFullYear()} ` +
|
||||
`${d.getHours().toString().padStart(2, '0')}:${d.getMinutes().toString().padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user