Use $this->now instead of passing it as parameter.
This commit is contained in:
parent
3a16813fc8
commit
93514517e9
1 changed files with 8 additions and 4 deletions
12
RelativeDateParser.php
Normal file → Executable file
12
RelativeDateParser.php
Normal file → Executable file
|
@ -250,11 +250,15 @@ class RelativeDateParser {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrent(DateTime $now) {
|
public function getCurrent() {
|
||||||
return $this->datetype->getCurrent($now);
|
return $this->datetype->getCurrent($this->now);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNext(DateTime $now) {
|
public function getNext() {
|
||||||
return $this->datetype->getNext($now);
|
return $this->datetype->getNext($this->now);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNow(DateTime $now) {
|
||||||
|
$this->now = $now;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in a new issue