replace all hardcoded en-US and $ formatting with locale-aware helpers

This commit is contained in:
Your Name
2026-02-17 23:39:31 +02:00
parent 313466ea15
commit d1c7ce406a
7 changed files with 23 additions and 53 deletions

View File

@@ -87,7 +87,7 @@
</div>
<div class="text-right">
<p class="text-[0.75rem] font-mono text-text-primary">{{ formatDuration(entry.duration) }}</p>
<p class="text-[0.6875rem] text-text-tertiary">{{ formatDate(entry.start_time) }}</p>
<p class="text-[0.6875rem] text-text-tertiary">{{ formatDateTime(entry.start_time) }}</p>
</div>
</div>
</div>
@@ -110,6 +110,7 @@ import { useEntriesStore } from '../stores/entries'
import { useToastStore } from '../stores/toast'
import { Timer as TimerIcon } from 'lucide-vue-next'
import AppSelect from '../components/AppSelect.vue'
import { formatDateTime } from '../utils/locale'
const timerStore = useTimerStore()
const projectsStore = useProjectsStore()
@@ -200,17 +201,6 @@ function formatDuration(seconds: number): string {
return `${minutes}m`
}
// Format date
function formatDate(dateString: string): string {
const date = new Date(dateString)
return date.toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
hour: '2-digit',
minute: '2-digit'
})
}
// Load data on mount
onMounted(async () => {
await Promise.all([