you can download CSS and js from the attachments at the bottom.
Step 2: Create the PHP to get the current date and the existing date of the product. Then we will compare two dates so that we can get number of hours and days between them. it's code will go like this:-
$datetime1 = new DateTime($value['expiry_date']);
$datetime2 = new DateTime(date("Y-m-d H:i:s"));
$interval = $datetime1->diff($datetime2);
$days = $interval->format('%a');
$hours = $interval->format('%h');
In the code above var $days is having the number of days indifference and var $hours show number of hours after days. Now we can start showing the countdown timer. And it's code will go like this:-