MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getWeekEnd

Function getWeekEnd

scripts/get-changelog.ts:31–38  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

29}
30
31function getWeekEnd(date: Date): Date {
32 const d = new Date(date)
33 const day = d.getDay()
34 const diff = d.getDate() - day + (day === 0 ? 0 : 7) // Sunday as end of week
35 d.setDate(diff)
36 d.setHours(23, 59, 59, 999)
37 return d
38}
39
40function subtractWeeks(date: Date, weeks: number): Date {
41 const d = new Date(date)

Callers 1

generateAllChangelogsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected