feat: add format date(#40)
Some checks failed
it-academy/dry-wash-pl/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2024-11-24 12:08:45 +03:00
parent 920f4440e9
commit acd39b1e32
8 changed files with 61 additions and 26 deletions

12
src/lib/date-helpers.ts Normal file
View File

@@ -0,0 +1,12 @@
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,
});
};