feat: replace all hardcoded en-US and $ formatting with locale-aware helpers
This commit is contained in:
@@ -231,6 +231,7 @@ import AppSelect from '../components/AppSelect.vue'
|
||||
import AppDatePicker from '../components/AppDatePicker.vue'
|
||||
import { useEntriesStore, type TimeEntry } from '../stores/entries'
|
||||
import { useProjectsStore } from '../stores/projects'
|
||||
import { formatDate } from '../utils/locale'
|
||||
|
||||
const entriesStore = useEntriesStore()
|
||||
const projectsStore = useProjectsStore()
|
||||
@@ -316,16 +317,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',
|
||||
year: 'numeric'
|
||||
})
|
||||
}
|
||||
|
||||
// Apply filters
|
||||
function applyFilters() {
|
||||
entriesStore.fetchEntries(startDate.value || undefined, endDate.value || undefined)
|
||||
|
||||
Reference in New Issue
Block a user