Skip to main content

isValidMonth

The isValidMonth function determines whether a given month is a valid month between 1 and 12.

Usage Example

import { isValidMonth } from 'calendar-widgets';

const isValid = isValidMonth(4);
console.log(isValid); // Output: true

Parameters

The function takes the following parameter:

Name
month
Type
number
Description

Return value

The function returns a boolean value. Returns true if the month parameter is a valid month between 1 and 12, false otherwise.