Moved GB/MB configuration for ADSL into database

This commit is contained in:
Deon George
2013-11-18 15:18:50 +11:00
parent a711e70b60
commit 89deb9c97b
7 changed files with 49 additions and 23 deletions

View File

@@ -126,6 +126,16 @@ class Period {
return $result;
}
/**
* Return if a date is in the same month as another date
*/
public static function inMonth($date,$period=NULL) {
if (is_null($period))
$period = time();
return ($date >= strtotime('first day of',$period) AND $date <= strtotime('last day of',$period));
}
public static function multiple($rs) {
switch($rs) {
case 0: $multiple=52; break;