mazey
    Preparing search index...

    Function isThisWeek

    • Check whether a date is in the current Monday-first local calendar week.

      Usage:

      import { isThisWeek } from "mazey";

      const ret = isThisWeek(new Date());
      console.log(ret);

      Output:

      true
      

      Parameters

      • date: MazeyDate

        A Date, millisecond timestamp, or string accepted by isValidDate.

      Returns boolean

      Whether the value is in the current local week. Invalid input returns false.

      The week begins on Monday and ends before the following Monday. Boundaries use local time and a half-open range.