The min and max functions work differently to the other functions because they ignore invalid dates if at least one valid date has been provided. This makes the underlying find function they're implemented with look a bit odd as it now sanitises the data twice. It should probably work like the other functions in the library and return an error if any of the dates are invalid but that would be a breaking change. I would prefer if there was no error handling logic in any of these functions.
The
min
andmax
functions work differently to the other functions because they ignore invalid dates if at least one valid date has been provided. This makes the underlyingfind
function they're implemented with look a bit odd as it now sanitises the data twice. It should probably work like the other functions in the library and return an error if any of the dates are invalid but that would be a breaking change. I would prefer if there was no error handling logic in any of these functions.