Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ function App() {
|
||||
|
||||
const lang =
|
||||
[userLanguage, settingsLanguage, savedLang, defaultLang].find(
|
||||
(l): l is string => isValidLanguage(l)
|
||||
(l) => !!l && isValidLanguage(l)
|
||||
) || "en";
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
@@ -992,10 +992,9 @@ function formatEnd(
|
||||
const startDate = new Date(start);
|
||||
const endDate = new Date(end);
|
||||
|
||||
const sameDay =
|
||||
startDate.getFullYear() === endDate.getFullYear() &&
|
||||
startDate.getMonth() === endDate.getMonth() &&
|
||||
startDate.getDate() === endDate.getDate();
|
||||
const formatDatePart = (d: Date) =>
|
||||
d.toLocaleDateString("en-CA", { timeZone }); // YYYY-MM-DD format
|
||||
const sameDay = formatDatePart(startDate) === formatDatePart(endDate);
|
||||
|
||||
if (allday) {
|
||||
return sameDay
|
||||
|
||||
Reference in New Issue
Block a user