13 lines
484 B
TypeScript
13 lines
484 B
TypeScript
|
|
export const eur = (cents: number | null | undefined) =>
|
||
|
|
cents == null ? '[PRIX]' : (cents / 100).toLocaleString('fr-FR', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + ' €'
|
||
|
|
|
||
|
|
export const hhmm = (t: number) =>
|
||
|
|
new Date(t).toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' }).replace(':', 'h')
|
||
|
|
|
||
|
|
export const payLabel: Record<string, string> = {
|
||
|
|
carte: 'Carte bancaire',
|
||
|
|
apple: 'Apple Pay',
|
||
|
|
google: 'Google Pay',
|
||
|
|
especes: 'Espèces au retrait'
|
||
|
|
}
|