- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
Function DateDiff ($interval,$date1,$date2)
{
// получает количество секунд между двумя датами
$timedifference = $date2 - $date1;
switch ($interval) {
case 'w':
$retval = bcdiv($timedifference,604800);
break;
case 'd':
$retval = bcdiv($timedifference,86400);
break;
case 'h':
$retval =bcdiv($timedifference,3600);
break
case 'n':
$retval = bcdiv($timedifference,60);
break;
case 's':
$retval = $timedifference;
break;
}
return $retval;
}
dev6alexander 18.09.2012 07:29 # −1
guest 21.09.2012 00:31 # +1
kryoz 21.09.2012 13:14 # 0
guest 18.09.2012 08:57 # +1
Lure Of Chaos 18.09.2012 10:05 # 0
Jll-O6OBb 25.08.2021 21:12 # 0