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

Function isWithinWeek

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

Source from the content-addressed store, hash-verified

96}
97
98function isWithinWeek(date: Date): boolean {
99 const weekAgo = new Date();
100 weekAgo.setDate(weekAgo.getDate() - 7);
101 return date > weekAgo;
102}
103
104function getDayName(date: Date): string {
105 return date.toLocaleDateString('en-US', { weekday: 'long' });

Callers 1

formatUnixTimestampFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected