Message timestamp now adds a leading zero to values under ten (minutes only)
This commit is contained in:
@@ -11,7 +11,7 @@ import { decodedTextSpanIntersectsWith } from 'typescript';
|
|||||||
})
|
})
|
||||||
|
|
||||||
const date = new Date(Number(props.timestamp));
|
const date = new Date(Number(props.timestamp));
|
||||||
const timestampFormatted = date.getDay() + "." + date.getMonth() + "." + date.getFullYear() + ", " + date.getHours() + ":" + date.getMinutes();
|
const timestampFormatted = date.getDay() + "." + date.getMonth() + "." + date.getFullYear() + ", " + date.getHours() + ":" + (date.getMinutes() + '').padStart(2, '0');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user