The complexity of your function is designed to enforce the correct number of days in month.
For all dates (in recent history) require 1-12 in the months field and 2 or four digits in the years field. Why not just write a simple regular expression to validate the date is composed of the proper characters.
\b(1[12]|0?[1-9])[.\/-]([0-9]{2}?[0-9]{2})\b