Function isFirstDayOfMonth

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

    Parameters

    • Optionaldate: Date

      the date to check

    Returns boolean

    whether the date is the first day of month

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