adding sanitization method for return value of date