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

Function isTodayStamp

packages/shared/src/lib/dateFormat.ts:24–32  ·  view source on GitHub ↗
(stamp?: string | null)

Source from the content-addressed store, hash-verified

22// once-per-day guard idiom shared by the quest offers popup and the reading
23// reminder hero. A missing or unparseable stamp counts as not seen.
24export const isTodayStamp = (stamp?: string | null): boolean => {
25 if (!stamp) {
26 return false;
27 }
28
29 const parsed = new Date(stamp);
30
31 return isValidDate(parsed) && isToday(parsed);
32};
33
34export const publishTimeRelativeShort = (
35 value: Date | number | string,

Callers 1

getHasSeenTodayFunction · 0.90

Calls 1

isValidDateFunction · 0.85

Tested by

no test coverage detected