我需要区别这两者:
routes
输出为$time1 = strtotime('26:56:45');
$time2 = strtotime('8:21:15');
。
答案 0 :(得分:1)
@Pervez只需使用date()函数两个更改日期时间格式即可 下面试试吧
<?php
$time1 = strtotime('26:56:45');
$time2 = strtotime('8:21:15');
$difference = date("H:i", ($time1 - $time2));
echo $difference;
?>
在这里,您将获得所需的差异
答案 1 :(得分:0)
以下是答案..
示例强>
holder.itemView.setBackgroundDrawable(
ContextCompat.getDrawable(itemView.getContext(), R.drawable.bubble))
答案 2 :(得分:0)
$datetime1 = new DateTime("10:50:30");
$datetime2 = new DateTime("now");
$interval = $datetime1->diff($datetime2);
echo $interval->h,":",$interval->i,":",$interval->s;