Created
June 14, 2014 09:20
-
-
Save jianghu52/536c3cc6f4a28d0520c5 to your computer and use it in GitHub Desktop.
简单的一个算时间的小程序,主要是用于发日报用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date('H'); | |
date('Y-m-d H:i:s'); | |
$endTime_h = date('H'); | |
$endTime_m = date('i'); | |
echo $endTime_m;echo "<br/>"; | |
if($endTime_m > 30){ | |
$work_m = 0.5; | |
}else{ | |
$work_m = 0; | |
} | |
echo $work_m; | |
$work_h = (int)$endTime_h - 10; | |
echo $work_h; | |
echo "<br/>"; | |
$work_all = (int)$work_h + $work_m; | |
echo $work_all; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment