MCPcopy Create free account
hub / github.com/dailydotdev/apps / isDateOnlyEqual

Function isDateOnlyEqual

packages/shared/src/lib/dateFormat.ts:188–201  ·  view source on GitHub ↗
(left: Date, right: Date)

Source from the content-addressed store, hash-verified

186}
187
188export const isDateOnlyEqual = (left: Date, right: Date): boolean => {
189 const formattedLeft = new Date(
190 left.getFullYear(),
191 left.getMonth(),
192 left.getDate(),
193 );
194 const formattedRight = new Date(
195 right.getFullYear(),
196 right.getMonth(),
197 right.getDate(),
198 );
199
200 return isEqual(formattedLeft, formattedRight);
201};
202
203export const getReadHistoryDateFormat = (currentDate: Date): string => {
204 const today = new Date();

Callers 4

getLabelFunction · 0.90
isSameDayFunction · 0.90
groupByDayFunction · 0.90
getReadHistoryDateFormatFunction · 0.85

Calls

no outgoing calls

Tested by 1

getLabelFunction · 0.72