Checks if a given date is a valid solar date within the range from January 31, 1900 to December 31, 2100. This function first ensures that the date is a valid Date object and then checks whether it falls within the specified range.
Date
The value to check.
True if the date is a valid solar date, otherwise false.
// => trueisValidSolar(new Date('2025-01-1T00:00:00Z')) Copy
// => trueisValidSolar(new Date('2025-01-1T00:00:00Z'))
// => falseisValidSolar(new Date('1900-01-30T00:00:00Z')) Copy
// => falseisValidSolar(new Date('1900-01-30T00:00:00Z'))
// => falseisValidSolar(new Date('2101-01-01T00:00:00Z')) Copy
// => falseisValidSolar(new Date('2101-01-01T00:00:00Z'))
Checks if a given date is a valid solar date within the range from January 31, 1900 to December 31, 2100. This function first ensures that the date is a valid
Date
object and then checks whether it falls within the specified range.