This below would parse the string, in the specified format into a valid date time object. STR_TO_DATE only works when the date mask is valid
How to Test a Date for Validity
Needed a function to test if a date was valid in PHP. This function does that but it also requires an expected date format. Example
Calculate a Time Difference Ago (ex: 4 hours ago)
This php function takes a timestamp and returns a detailed string of the time difference expressed in seconds, minutes, hours, days ago, or away if