MCPcopy
hub / github.com/date-fns/date-fns / isYesterday

Function isYesterday

pkgs/core/src/isYesterday/index.ts:31–39  ·  view source on GitHub ↗
(
  date: DateArg<Date> & {},
  options?: IsYesterdayOptions | undefined,
)

Source from the content-addressed store, hash-verified

29 * //=> true
30 */
31export function isYesterday(
32 date: DateArg<Date> & {},
33 options?: IsYesterdayOptions | undefined,
34): boolean {
35 return isSameDay(
36 constructFrom(options?.in || date, date),
37 subDays(constructNow(options?.in || date), 1),
38 );
39}

Callers 2

test.tsFile · 0.90
_testFunction · 0.90

Calls 4

isSameDayFunction · 0.90
constructFromFunction · 0.90
subDaysFunction · 0.90
constructNowFunction · 0.90

Tested by

no test coverage detected