#Dyalog APL, 32 33 bytes
Dyalog APL, 32 33 bytes
⍕¨{⍵-3↑31 11≡2↑⍵}31 12 1E4⌊⍎∊⍕⌽¨⎕
I/O is list of three strings ('dd' 'mm' 'yyyy'
).
TryAPL, but note that ⎕
(prompt for input) has been replaced with ⍵
and the entire line enclosed in {
...}
to enable online testing, and ⍎
(execute expression) has been replaced with 2⊃⎕VFI
(verify and fix input) because execution of arbitrary code is blocked.