MCPcopy Index your code
hub / github.com/winfunc/opcode / isYesterday

Function isYesterday

src/lib/date-utils.ts:92–96  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

90}
91
92function isYesterday(date: Date): boolean {
93 const yesterday = new Date();
94 yesterday.setDate(yesterday.getDate() - 1);
95 return date.toDateString() === yesterday.toDateString();
96}
97
98function isWithinWeek(date: Date): boolean {
99 const weekAgo = new Date();

Callers 1

formatUnixTimestampFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected