Parses the given date candidates and returns the first valid Date object found.
The date candidates to parse, which can be either strings or Date objects.
The parsed Date object, or undefined if no valid date is found.
Parses the given date candidates and returns the first valid Date object found.