summaryrefslogtreecommitdiff
path: root/app/Fact.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-11-11 06:49:16 +0000
committerGreg Roach <fisharebest@webtrees.net>2018-11-18 09:14:43 +0000
commit2decada70ae5df289448aadc0d1089d2606545d1 (patch)
treec1c7127743c6a2e3822d8f76a20b6b6e6204db6b /app/Fact.php
parent4fb14fcb5ee76066edbf821710fa9ec3480291bf (diff)
downloadwebtrees-2decada70ae5df289448aadc0d1089d2606545d1.tar.gz
webtrees-2decada70ae5df289448aadc0d1089d2606545d1.tar.bz2
webtrees-2decada70ae5df289448aadc0d1089d2606545d1.zip
Rename Fact::getDate() to date()
Diffstat (limited to 'app/Fact.php')
-rw-r--r--app/Fact.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Fact.php b/app/Fact.php
index 873eb1e93f..a7f70cd030 100644
--- a/app/Fact.php
+++ b/app/Fact.php
@@ -317,7 +317,7 @@ class Fact
*
* @return Date
*/
- public function getDate(): Date
+ public function date(): Date
{
if ($this->date === null) {
$this->date = new Date($this->attribute('DATE'));
@@ -517,7 +517,7 @@ class Fact
$attributes[] = '<span dir="auto">' . e($value) . '</span>';
}
// Fact date
- $date = $this->getDate();
+ $date = $this->date();
if ($date->isOK()) {
if (in_array($this->getTag(), explode('|', WT_EVENTS_BIRT)) && $this->record() instanceof Individual && $this->record()->getTree()->getPreference('SHOW_PARENTS_AGE')) {
$attributes[] = $date->display() . FunctionsPrint::formatParentsAges($this->record(), $date);
@@ -555,9 +555,9 @@ class Fact
*/
public static function compareDate(Fact $a, Fact $b)
{
- if ($a->getDate()->isOK() && $b->getDate()->isOK()) {
+ if ($a->date()->isOK() && $b->date()->isOK()) {
// If both events have dates, compare by date
- $ret = Date::compare($a->getDate(), $b->getDate());
+ $ret = Date::compare($a->date(), $b->date());
if ($ret == 0) {
// If dates are the same, compare by fact type