fix: 12 hour timestamp logic corrected

This commit is contained in:
Eli Bosley
2024-12-16 15:06:41 -05:00
parent 833a99fe18
commit 6cbb9c07e4

View File

@@ -72,8 +72,7 @@ const reformattedTimestamp = computed(() => {
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
hour12:
['AM', 'PM'].includes(props.formattedTimestamp ?? 'AM')
hour12: ['AM', 'PM'].some(period => (props.formattedTimestamp ?? 'AM').includes(period))
}).format(new Date(props.timestamp ?? new Date()));
return reformattedDate;
});