MCPcopy Create free account
hub / github.com/Effect-TS/effect / nextDayOfMonth

Function nextDayOfMonth

packages/effect/src/internal/schedule.ts:1810–1819  ·  view source on GitHub ↗
(now: number, day: number, initial: boolean)

Source from the content-addressed store, hash-verified

1808
1809/** @internal */
1810export const nextDayOfMonth = (now: number, day: number, initial: boolean): number => {
1811 const date = new Date(now)
1812 if (date.getDate() === day && initial) {
1813 return now
1814 }
1815 if (date.getDate() < day) {
1816 return date.setDate(day)
1817 }
1818 return findNextMonth(now, day, 1)
1819}
1820
1821/** @internal */
1822export const findNextMonth = (now: number, day: number, months: number): number => {

Callers 1

dayOfMonthFunction · 0.85

Calls 1

findNextMonthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…