From 93514517e980914d9e60c99e7ddd770cc6b9fc7d Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sun, 21 Sep 2014 18:36:48 +0200 Subject: [PATCH] Use $this->now instead of passing it as parameter. --- RelativeDateParser.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) mode change 100644 => 100755 RelativeDateParser.php diff --git a/RelativeDateParser.php b/RelativeDateParser.php old mode 100644 new mode 100755 index 0a8a42c..861f76d --- a/RelativeDateParser.php +++ b/RelativeDateParser.php @@ -250,11 +250,15 @@ class RelativeDateParser { } - public function getCurrent(DateTime $now) { - return $this->datetype->getCurrent($now); + public function getCurrent() { + return $this->datetype->getCurrent($this->now); } - public function getNext(DateTime $now) { - return $this->datetype->getNext($now); + public function getNext() { + return $this->datetype->getNext($this->now); + } + + public function setNow(DateTime $now) { + $this->now = $now; } } \ No newline at end of file