From 914b6e6444e3434520d6226f08b16707939d7d6a Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Tue, 15 May 2018 19:45:23 +0000
Subject: [PATCH] Lint: Lint fixes

---
 include/class.format.php |  2 +-
 include/class.forms.php  | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/class.format.php b/include/class.format.php
index 27497d3d3..de7bc98bb 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -609,7 +609,7 @@ class Format {
         return $tz;
     }
 
-    function parseDatetime($date, $locale=null, $format=false) {
+    function parseDateTime($date, $locale=null, $format=false) {
         global $cfg;
 
         if (!$date)
diff --git a/include/class.forms.php b/include/class.forms.php
index a1d7a331d..954ea2581 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -1822,7 +1822,7 @@ class DatetimeField extends FormField {
     function display($value) {
         global $cfg;
 
-        if (!$value || !($datetime = Format::parseDatetime($value)))
+        if (!$value || !($datetime = Format::parseDateTime($value)))
             return '';
 
         $config = $this->getConfiguration();
@@ -1933,14 +1933,14 @@ class DatetimeField extends FormField {
 
         $config = $this->getConfiguration();
         parent::validateEntry($value);
-        if (!$value || !($datetime = Format::parseDatetime($value)))
+        if (!$value || !($datetime = Format::parseDateTime($value)))
             return;
 
         // Parse value to DateTime object
-        $val = Format::parseDatetime($value);
+        $val = Format::parseDateTime($value);
         // Get configured min/max (if any)
-        $min = $this->getMinDatetime();
-        $max = $this->getMaxDatetime();
+        $min = $this->getMinDateTime();
+        $max = $this->getMaxDateTime();
 
         if (!$val) {
             $this->_errors[] = __('Enter a valid date');
-- 
GitLab