Returns a local day range at a particular Date.

Type signature

(date: Date) => Date[]

Examples

const date = new Date(
  "2018-12-31T13:54:33.232Z",
);

dayRange(date);
// ⇒ [startOfDay(date), endOfDay(date)]
Try in REPL

Questions

  • How to find a date range of a given day?

TypeScript sourceJavaScript source