Fix #6467 - handle holdays for free night parking
authorAlan Knowles <alan@roojs.com>
Wed, 11 Nov 2020 03:06:30 +0000 (11:06 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 11 Nov 2020 03:06:30 +0000 (11:06 +0800)
DataObjects/Core_holiday.php

index 45ac129..b453133 100644 (file)
@@ -89,5 +89,12 @@ class Pman_Core_DataObjects_Core_holiday extends DB_DataObject
         }
 
     }
+    function isHoliday($country, $date)
+    {
+        $d = DB_DataObject::Factory('core_holiday');
+        $d->country = $country;
+        $d->holiday_date = $date;
+        return $d->count();
+    }
     
 }