* UpDate
This commit is contained in:
@@ -256,6 +256,28 @@ class todoModel extends model
|
||||
return date(DT_DATE1, strtotime('yesterday'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tomorrow.
|
||||
*
|
||||
* @access public
|
||||
* @return date
|
||||
*/
|
||||
public function tomorrow()
|
||||
{
|
||||
return date(DT_DATE1, strtotime('tomorrow'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the day before yesterday.
|
||||
*
|
||||
* @access public
|
||||
* @return date
|
||||
*/
|
||||
public function twoDaysAgo()
|
||||
{
|
||||
return date(DT_DATE1, strtotime('-2 days'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get now time period.
|
||||
*
|
||||
@@ -362,4 +384,18 @@ class todoModel extends model
|
||||
if($weekDay == 7) $baseTime = time() - 86400 * 10; // Make sure is last thursday.
|
||||
return $baseTime;
|
||||
}
|
||||
|
||||
public function getThisMonth()
|
||||
{
|
||||
$begin = date('Y-m');
|
||||
$end = date('Y-m', strtotime('next month'));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
public function getLastMonth()
|
||||
{
|
||||
$begin = date('Y-m', strtotime('last month'));
|
||||
$end = date('Y-m', strtotime('this month'));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user