vendredi 6 novembre 2015

Year Quarter PHP / Javascript pattern

I need pattern for a quarter of a year, for example 1/2015 -> first quarter of the 2015. 4/2015 -> fourth quarter of the year. I need to validate given value for being a quarter. How I can achieve that in javascript or php ? I guess that in PHP preg_match function is good way to go but I have difficulties with creating correct pattern...

Aucun commentaire:

Enregistrer un commentaire