CJam, 24 bytes
qS/Wf%[_1=:=31^sCs].e<S*
I/O format is dd mm yyyy
.
Same byte count, I/O format mm dd yyyy
:
qS/Wf%_0=:=1231^s2/.e<S*
Explanation
qS/ e# Read input, split around spaces.
Wf% e# Reverse each component.
[ e# Set marker for new list.
_1= e# Duplicate reversed strings, extract reversed month.
:= e# Check for equality forof the characters. This gives 1 for
e# November (11) and 0 for everything else.
31^ e# XOR the result with 31, giving 30 for November and 31
e# for everything else.
s e# Convert the result to a string, "30"/"31".
Cs e# Push 12, convert to string, "12".
] e# Wrap "30"/"31" and "12" in a list.
.e< e# Element-wise minimum. This clamps the day and month to their
e# respective maxima.
S* e# Join the result with spaces.
The other version works similarly, except that we start from the integer 1230
or 1231
before converting it to ["12" "30"]
or ["12" "31"]
.