How to check if date format is correct?

Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012

all the following conditions must return an error:
*input of string
*day is > 31 or < 1
*month is > 12 or < 1
*year is < 2013

suppose the date format is stored in a variable start_date. i want it to be something like:
start_date="some code here"
so that i can do the following if condition:

if input == start_date
   echo "correct format!"
else
   echo "incorrect format!"

tnx in advance for the answers :slight_smile:

Have you tried searching these forums yet?
A good start would be the list of 'hints' at the bottom of this thread (More UNIX and Linux Forum Topics You Might Find Helpful)