Spaces:
Sleeping
Sleeping
MichaelEdou
feat: add Excel export, filters, search, match accuracy, journal page, and email viewer improvements
e85d815 | const currencyFormatter = new Intl.NumberFormat('fr-CA', { | |
| style: 'currency', | |
| currency: 'CAD', | |
| minimumFractionDigits: 2, | |
| maximumFractionDigits: 2, | |
| }); | |
| export function formatCurrency(amount: number): string { | |
| return currencyFormatter.format(amount); | |
| } | |
| export function formatDate(dateString: string): string { | |
| const date = new Date(dateString); | |
| return date.toLocaleDateString('fr-CA', { | |
| year: 'numeric', | |
| month: '2-digit', | |
| day: '2-digit', | |
| timeZone: 'America/Toronto', | |
| }); | |
| } | |
| export function formatDateTime(dateString: string): string { | |
| const date = new Date(dateString); | |
| return date.toLocaleString('fr-CA', { | |
| year: 'numeric', | |
| month: '2-digit', | |
| day: '2-digit', | |
| hour: '2-digit', | |
| minute: '2-digit', | |
| timeZone: 'America/Toronto', | |
| }); | |
| } | |