Site Status and Room numbers implemented

This commit is contained in:
Deon George
2014-09-05 15:13:25 +10:00
parent 2115c70db0
commit 30f6717c9f
10 changed files with 166 additions and 18 deletions

View File

@@ -10,6 +10,9 @@
* @license http://dev.leenooks.net/license.html
*/
class Site extends lnApp_Site {
private static $_weekstart = 'monday'; // @todo Move into setup table
private static $_weekend = 'sunday'; // @todo Move into setup table
/**
* Show a date using a site configured format
*/
@@ -17,6 +20,14 @@ class Site extends lnApp_Site {
return (is_null($date) OR ! $date) ? '' : date(Company::instance()->date_format(),$date);
}
public static function DateEndOfWeek($date) {
return strtotime(self::$_weekend.' this week',$date);
}
public static function DateStartOfWeek($date) {
return strtotime(self::$_weekstart.' this week',$date);
}
/**
* Work out our site ID for multihosting
*/