Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions Plugins.

Plugins. Functions

  • name

    startOfWeek

    summary

    Return the start of a week for the given date.

    description

    Return the start of a week for the given date.

    example

    // The start of a week for 2 October 2021 09:50:01: const result = startOfWeek(new Date(2021, 10, 2, 09, 50, 1)) //=> Sep 26 2021 00:00:00

    Parameters

    • date: DateTime

      the original date

    • weekStartsOn: number

    Returns DateTime

    the start of a month

Generated using TypeDoc