Function isLastDayOfMonth

  • Returns whether the given date is the last day of month

    Parameters

    • Optionaldate: Date

      the date to check

    Returns boolean

    whether the date is the last day of month

    isLastDayOfMonth(new Date(2023, 8, 1));    // false
    isLastDayOfMonth(new Date(2023, 8, 30)); // true