<!-- Start CountDown -->
<?php
$id = rand().time();
$strEndDate = strtotime("2099-12-31 00:00:00");
$check = date('G:i:s', $strEndDate);
if ($check == "0:00:00") {
    $endDate = date('m/d/Y \2\3\:\5\9\:\0\0', $strEndDate);
} else {
    $endDate = date('m/d/Y G:i:s', $strEndDate);
}

?>

<div id="countdown-<?= $id; ?>" class="ub-countdown">
    <ul>
        <li class="days">%%D%% <span class="text"><?= __('Day'); ?></span></li>
        <li class="hours">%%H%% <span class="text"><?= __('Hours'); ?></span></li>
        <li class="minutes">%%M%% <span class="text"><?= __('Mins'); ?></span></li>
        <li class="seconds">%%S%% <span class="text"><?= __('Secs'); ?></span></li>
    </ul>
</div>
<script type="text/javascript">
    require([
        "jquery",
        "Ubertheme_Base/js/ubCountDown",
        "domReady!"
    ], function ($) {
        'use strict';
        $.mage.ubCountDown({
            element: "#countdown-<?= $id; ?>",
            endDate: "<?= $endDate; ?>",
            expiredMessage: "<?= __('Expired');?>"
        });
    });
</script>
<!-- End CountDown -->
