switch case with date function program