isValidYear
The isValidYear
function determines whether a given year is a valid year between 1900 and 2100.
Usage Example
import { isValidYear } from 'calendar-widgets';
const isValid = isValidYear(2023);
console.log(isValid); // Output: true
Parameters
The function takes the following parameter:
- Name
year
- Type
- number
- Description
Return Value
The function returns a boolean value. Returns true if the year parameter is a valid year between 1900 and 2100, false otherwise.