• 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.

    Parameters

    • date: unknown

      The value to check.

    Returns date is Date

    True if the date is a valid solar date, otherwise false.

    // => true
    isValidSolar(new Date('2025-01-1T00:00:00Z'))
    // => false
    isValidSolar(new Date('1900-01-30T00:00:00Z'))
    // => false
    isValidSolar(new Date('2101-01-01T00:00:00Z'))