created functions needed to create, check, and parse datetime