Use constants instead of hardcoded strings in DateFormField
authorMatthias Schmidt <gravatronics@live.com>
Sun, 26 Jan 2020 08:16:51 +0000 (09:16 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 26 Jan 2020 08:16:51 +0000 (09:16 +0100)
wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php

index ca3ddb9cdeedc956ede52213f19a147b95b9310f..f40468573739ec64b451535cd60e7b83c505ec58 100644 (file)
@@ -360,10 +360,10 @@ class DateFormField extends AbstractFormField implements IAutoFocusFormField, II
                }
                
                if ($this->supportsTime()) {
-                       parent::value($dateTime->format('Y-m-d\TH:i:sP'));
+                       parent::value($dateTime->format(static::TIME_FORMAT));
                }
                else {
-                       parent::value($dateTime->format('Y-m-d'));
+                       parent::value($dateTime->format(static::DATE_FORMAT));
                }
                
                return $this;