update datetime class with new regexp logic