1
0
Fork 0
forked from Kispi/Core
HGOE-SaS/webapp/src/services/currency.service.ts
Simon Giesel 3e1437300f
All checks were successful
continuous-integration/drone/push Build is passing
feat(core): add employer portal with mock data
2023-06-30 16:18:07 +02:00

14 lines
No EOL
444 B
TypeScript

export class CurrencyService {
public static toString(value: number): string {
return `${(value / 100).toLocaleString('de-DE', {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})} Batzen`;
}
public static toSignedString(value: number): string {
return `${(value / 100) > 0 ? '+' : ''}${(value / 100).toLocaleString('de', {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})} Batzen`;
}
}