/**
Given any 3 numbers, and list the permutations of valid dates. For example, giving (2, 7, 29),
the permutations of valid dates would be [(2, 7, 29), (29, 2, 7), (29, 7, 2)], if in (yyyy,mm,dd) format.
If there is no valid permutation, return an empty list. Please implement this function, get_valid_dates(num1, num2, num3).
Hint: Please notice solar/lunar months and leap year issues.
Other examples:
(4, 13, 100) --> [(100, 4, 13)]
(21, 13, 15) --> [ ], no valid permutation
(5,6,7) --> [(5,6,7), (5,7,6), (6,5,7), (6,7,5), (7,5,6), (7,6, 5)]
(6,31,10) --> [(6,10,31), (31,6,10),(31,10,6)]
References:
Solar Months: Jan(1), Mar(3). May(5), Jul(7), Aug(8), Oct(10), Dec(12) --> 31 days
Lunar Months: Apr(4), Jun(6), Sep(9), Nov(11) --> 30 days
February (2) --> In a leap year, Feb has 29 days; if a normal year,, Feb has 28 days only;
The rule for leap years:
% 4 == 0, True; 4, 8, 12, 2004, 804, 2012,
% 100 == 0, False; 1800, 1900, 2100
% 400 == 0, True; 1200, 1600, 2000
% 3200 == 0, False; 3200, 6400, 9600
**/
/**
2, 7, 29
==》
year, month, day
v 2, 7, 29
x 2, 29, 7: month should be between 1 and 12.
x 7, 2, 29: in a normal year, Feb has 28 days only.
x 7, 29, 2: month should be between 1 and 12.
v 29, 2, 7
v 29, 7, 2
**/