The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit f6dac256 authored by Demian Katz's avatar Demian Katz
Browse files

Decoupled date converter from config reader.

parent fa82048c
No related merge requests found
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link http://vufind.org/wiki/vufind2:developer_manual Wiki
*/ */
namespace VuFind\Date; namespace VuFind\Date;
use DateTime, VuFind\Config\Reader as ConfigReader, use DateTime, VuFind\Exception\Date as DateException;
VuFind\Exception\Date as DateException;
/** /**
* Date/time conversion functionality. * Date/time conversion functionality.
...@@ -59,15 +58,11 @@ class Converter ...@@ -59,15 +58,11 @@ class Converter
/** /**
* Constructor * Constructor
* *
* @param \Zend\Config\Config $config Configuration to use (set to null to load * @param \Zend\Config\Config $config Configuration to use (set to null to use
* default configuration using ConfigReader class). * defaults)
*/ */
public function __construct($config = null) public function __construct($config = null)
{ {
if (is_null($config)) {
$config = ConfigReader::getConfig();
}
// Set Display Date Format // Set Display Date Format
$this->displayDateFormat $this->displayDateFormat
= (isset($config->Site->displayDateFormat)) = (isset($config->Site->displayDateFormat))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment