Some useful functions for any php application

date format validation