You could look at fnIsDate() for some ideas.