MCPcopy Index your code
hub / github.com/formatjs/formatjs / DayWithinYear

Function DayWithinYear

packages/ecma262-abstract/DateOperations.ts:36–38  ·  view source on GitHub ↗
(t: number)

Source from the content-addressed store, hash-verified

34}
35
36export function DayWithinYear(t: number): number {
37 return Day(t) - DayFromYear(YearFromTime(t))
38}
39
40export function InLeapYear(t: number): 0 | 1 {
41 return DaysInYear(YearFromTime(t)) === 365 ? 0 : 1

Callers 2

MonthFromTimeFunction · 0.85
DateFromTimeFunction · 0.85

Calls 3

DayFunction · 0.85
DayFromYearFunction · 0.85
YearFromTimeFunction · 0.85

Tested by

no test coverage detected