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

Function isDateOnlyEqual

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

Source from the content-addressed store, hash-verified

171}
172
173export const isDateOnlyEqual = (left: Date, right: Date): boolean => {
174 const formattedLeft = new Date(
175 left.getFullYear(),
176 left.getMonth(),
177 left.getDate(),
178 );
179 const formattedRight = new Date(
180 right.getFullYear(),
181 right.getMonth(),
182 right.getDate(),
183 );
184
185 return isEqual(formattedLeft, formattedRight);
186};
187
188export const getReadHistoryDateFormat = (currentDate: Date): string => {
189 const today = new Date();

Callers 3

ReadHistoryListFunction · 0.90
getLabelFunction · 0.90
getReadHistoryDateFormatFunction · 0.85

Calls

no outgoing calls

Tested by 1

getLabelFunction · 0.72