Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

Given three integers, determine whether they can form a valid date in any standard date format. A date is considered valid if the integers can represent a date in formats such as yyyy-MM-dd, MM-dd-yyyy, or dd-MM-yyyy. All possible valid date formats should be considered, and the year should be within the range 1 to 9999. The month must be between 1 and 12, and the day must be valid for the given month and year, taking leap years into account.

Test Cases
Input
Output
Expected