mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 18:08:42 +00:00
fix: will start in ceil(x) days
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fc66e5afe5
commit
e013100989
@ -57,7 +57,7 @@
|
|||||||
$rest_seconds = $contest['start_time']->getTimestamp() - UOJTime::$time_now->getTimestamp();
|
$rest_seconds = $contest['start_time']->getTimestamp() - UOJTime::$time_now->getTimestamp();
|
||||||
?>
|
?>
|
||||||
<?php if ($rest_seconds > 86400): ?>
|
<?php if ($rest_seconds > 86400): ?>
|
||||||
<?= UOJLocale::get('contests::will start in x days', floor($rest_seconds / 86400)) ?>
|
<?= UOJLocale::get('contests::will start in x days', ceil($rest_seconds / 86400)) ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div id="contest-<?= $contest['id'] ?>-countdown"></div>
|
<div id="contest-<?= $contest['id'] ?>-countdown"></div>
|
||||||
<script>$('#contest-<?= $contest['id'] ?>-countdown').countdown(<?= $rest_seconds ?>, function(){}, 'inherit', false);</script>
|
<script>$('#contest-<?= $contest['id'] ?>-countdown').countdown(<?= $rest_seconds ?>, function(){}, 'inherit', false);</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user