Calculate number of days,hours, minute, seconds passed from todays date to some past date
<?php function get_time_differenceFromToday($fromDate) { $uts = strtotime( $fromDate );//date format YYYY-MM-DD HH:MM:SS $uts = time();//unix timestamp //strtotime( $end ) if( $uts!==-1 && $uts!==-1 ) { if( $uts >= $uts )…