📌  相关文章
📜  2 个时间输入之间的分钟差 laravel - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:18.680000             🧑  作者: Mango

代码示例1
$checkTime = strtotime('09:00:59');
echo 'Check Time : '.date('H:i:s', $checkTime);
echo '
'; $loginTime = strtotime('09:01:00'); $diff = $checkTime - $loginTime; echo 'Login Time : '.date('H:i:s', $loginTime).'
'; echo ($diff < 0)? 'Late!' : 'Right time!'; echo '
'; echo 'Time diff in sec: '.abs($diff); echo '
'; $loginTime = strtotime('09:00:59'); $diff = $checkTime - $loginTime; echo 'Login Time : '.date('H:i:s', $loginTime).'
'; echo ($diff < 0)? 'Late!' : 'Right time!'; echo '
'; $loginTime = strtotime('09:00:00'); $diff = $checkTime - $loginTime; echo 'Login Time : '.date('H:i:s', $loginTime).'
'; echo ($diff < 0)? 'Late!' : 'Right time!';