mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-22 13:26:20 +02:00
Update date formatting
This commit is contained in:
parent
2e349eb4e5
commit
ec97673546
1 changed files with 4 additions and 4 deletions
|
@ -45,7 +45,7 @@ export const decodeDateOption = (
|
||||||
type: "timeSlot",
|
type: "timeSlot",
|
||||||
startTime: formatInTimeZone(startDate, targetTimeZone, "hh:mm a"),
|
startTime: formatInTimeZone(startDate, targetTimeZone, "hh:mm a"),
|
||||||
endTime: formatInTimeZone(endDate, targetTimeZone, "hh:mm a"),
|
endTime: formatInTimeZone(endDate, targetTimeZone, "hh:mm a"),
|
||||||
day: formatInTimeZone(startDate, targetTimeZone, "dd"),
|
day: formatInTimeZone(startDate, targetTimeZone, "d"),
|
||||||
dow: formatInTimeZone(startDate, targetTimeZone, "E"),
|
dow: formatInTimeZone(startDate, targetTimeZone, "E"),
|
||||||
month: formatInTimeZone(startDate, targetTimeZone, "MMM"),
|
month: formatInTimeZone(startDate, targetTimeZone, "MMM"),
|
||||||
};
|
};
|
||||||
|
@ -55,7 +55,7 @@ export const decodeDateOption = (
|
||||||
type: "timeSlot",
|
type: "timeSlot",
|
||||||
startTime: format(date, "hh:mm a"),
|
startTime: format(date, "hh:mm a"),
|
||||||
endTime: format(new Date(end), "hh:mm a"),
|
endTime: format(new Date(end), "hh:mm a"),
|
||||||
day: format(date, "dd"),
|
day: format(date, "d"),
|
||||||
dow: format(date, "E"),
|
dow: format(date, "E"),
|
||||||
month: format(date, "MMM"),
|
month: format(date, "MMM"),
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,7 @@ export const decodeDateOption = (
|
||||||
const date = new Date(dateString);
|
const date = new Date(dateString);
|
||||||
return {
|
return {
|
||||||
type: "date",
|
type: "date",
|
||||||
day: format(date, "dd"),
|
day: format(date, "d"),
|
||||||
dow: format(date, "E"),
|
dow: format(date, "E"),
|
||||||
month: format(date, "MMM"),
|
month: format(date, "MMM"),
|
||||||
};
|
};
|
||||||
|
@ -87,7 +87,7 @@ export const removeAllOptionsForDay = (
|
||||||
|
|
||||||
export const getDateProps = (date: Date) => {
|
export const getDateProps = (date: Date) => {
|
||||||
return {
|
return {
|
||||||
day: format(date, "dd"),
|
day: format(date, "d"),
|
||||||
dow: format(date, "E"),
|
dow: format(date, "E"),
|
||||||
month: format(date, "MMM"),
|
month: format(date, "MMM"),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue