found bugs in date function, fixing

rewrote in regex because looping through allowable format to check was incorrectly accepting certain days. Need to add handling for leap year
missed checking in this file