For the above..question..same added
$perl -e 'use Time::Piece; print Time::Piece->strptime("2006-02-31", "%Y-%m-%d");'
will give you some date but
$perl -e 'use Time::Piece; print Time::Piece->strptime("2006-02-32", "%Y-%m-%d");'
will throw error.
That is, anything less than 32 accepts as valid day.