diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..b6f565d --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,15 @@ +Copyright (C) 2015 The Islandora Foundation and contributors + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with this program as the file LICENSE.txt; if not, please see +http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. diff --git a/src/Plugin/Field/FieldFormatter/EDTFFormatter.php b/src/Plugin/Field/FieldFormatter/EDTFFormatter.php index 19f7f45..31aacd5 100644 --- a/src/Plugin/Field/FieldFormatter/EDTFFormatter.php +++ b/src/Plugin/Field/FieldFormatter/EDTFFormatter.php @@ -27,7 +27,7 @@ class EDTFFormatter extends FormatterBase { * * @var array */ - private $DELIMITERS = [ + private const DELIMITERS = [ 'dash' => '-', 'stroke' => '/', 'period' => '.', @@ -276,7 +276,7 @@ protected function formatDate($edtf_text) { $formatted_date = "$month $day, $year"; } else { - $formatted_date = implode($this->DELIMITERS[$settings['date_separator']], array_filter($parts_in_order)); + $formatted_date = implode(self::DELIMITERS[$settings['date_separator']], array_filter($parts_in_order)); } // Time.