fix missed parentheses

This commit is contained in:
Johann150 2022-08-14 17:32:25 +02:00
parent 4e41fa8767
commit a07b464690
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -20,13 +20,13 @@ const props = withDefaults(defineProps<{
});
const _time = typeof props.time === 'string' ? new Date(props.time) : props.time;
const absolute = (): string => {
const absolute = ((): string => {
switch (props.format) {
case 'date': return _time.toLocaleDateString();
case 'time': return _time.toLocaleTimeString();
default: return _time.toLocaleString();
}
}();
})();
let now = $ref(new Date());
const relative = $computed(() => {