...
|
...
|
@@ -357,21 +357,22 @@ class Api |
|
|
//判断当前时间是否是每月第一天
|
|
|
public function time()
|
|
|
{
|
|
|
function getthemonth($date)
|
|
|
{
|
|
|
$firstday = date('Y-m-01', strtotime($date));
|
|
|
$nowday = date('Y-m-d', strtotime($date));
|
|
|
$lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
|
|
|
return array($firstday, $nowday, $lastday);
|
|
|
}
|
|
|
|
|
|
$today = date("Y-m-d");
|
|
|
$day = getthemonth($today);
|
|
|
if ($day[0] == $day[1]) {
|
|
|
return 1;
|
|
|
} else {
|
|
|
// return False;
|
|
|
return 2;
|
|
|
}
|
|
|
// function getthemonth($date)
|
|
|
// {
|
|
|
// $firstday = date('Y-m-01', strtotime($date));
|
|
|
// $nowday = date('Y-m-d', strtotime($date));
|
|
|
// $lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
|
|
|
// return array($firstday, $nowday, $lastday);
|
|
|
// }
|
|
|
//
|
|
|
// $today = date("Y-m-d");
|
|
|
// $day = getthemonth($today);
|
|
|
// if ($day[0] == $day[1]) {
|
|
|
// return 1;
|
|
|
// } else {
|
|
|
//// return False;
|
|
|
// return 2;
|
|
|
// }
|
|
|
return 1;
|
|
|
}
|
|
|
} |
...
|
...
|
|