mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add cap to dates on slices
This commit is contained in:
@@ -25,8 +25,10 @@ class DateService {
|
||||
|
||||
getChartLabelFromISO(iso: string, locale: string, slice: Slice) {
|
||||
const date = dayjs(iso).locale(locale);
|
||||
if (slice === 'hour') return date.format('HH:mm')
|
||||
if (slice === 'day') return date.format('DD/MM')
|
||||
if (slice === 'hour') return date.format('HH:mm');
|
||||
if (slice === 'day') return date.format('DD/MM');
|
||||
if (slice === 'month') return date.format('MM MMMM');
|
||||
if (slice === 'year') return date.format('YYYY');
|
||||
return date.format();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user