dry-wash-pl/src/lib/date-helpers.ts
RustamRu 8a0dff682b
Some checks failed
it-academy/dry-wash-pl/pipeline/head There was a failure building this commit
it-academy/dry-wash-pl/pipeline/pr-main There was a failure building this commit
feat: add order-view (#9)
2024-12-22 11:15:50 +03:00

16 lines
425 B
TypeScript

import dayjs from 'dayjs';
import i18next from 'i18next';
export const getTimeSlot = (start: string, end: string) => {
const startDay = dayjs(start).format('HH:mm');
const endDay = dayjs(end).format('HH:mm');
return i18next.t('~:dry-wash.washTime.timeSlot', {
start: startDay,
end: endDay,
});
};
export const formatDatetime = (datetime: string) => {
return dayjs(datetime).format('HH:mm DD.MM.YYYY');
};