Function getStartOfDay

  • Returns the start day date of the given date

    Parameters

    • Optionaldate: Date

      the date to inspect

    Returns Date | undefined

    the start day date of the given date

    getStartOfDay(new Date(2023, 8, 30, 12, 12, 12));    // Date(2023, 8, 30, 0, 0, 0)