Function getEndOfMonth

  • Returns the end month date of the given date

    Parameters

    • Optionaldate: Date

      the date to inspect

    Returns Date | undefined

    the end month date of the given date

    getEndOfMonth(new Date(2023, 8, 1));    // Date(2023, 8, 30, 23, 59, 59)