MCPcopy Create free account
hub / github.com/adobe/react-spectrum / startOfYear

Function startOfYear

packages/@internationalized/date/src/queries.ts:189–191  ·  view source on GitHub ↗
(date: DateValue)

Source from the content-addressed store, hash-verified

187export function startOfYear(date: CalendarDate): CalendarDate;
188export function startOfYear(date: DateValue): DateValue;
189export function startOfYear(date: DateValue): DateValue {
190 return startOfMonth(date.subtract({months: date.month - 1}));
191}
192
193/** Returns the last day of the year for the given date. */
194export function endOfYear(date: ZonedDateTime): ZonedDateTime;

Callers 3

alignStartFunction · 0.90
isSameYearFunction · 0.70
queries.test.jsFile · 0.50

Calls 2

startOfMonthFunction · 0.85
subtractMethod · 0.45

Tested by

no test coverage detected