summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Census/CensusColumnAgeMarried.php4
-rw-r--r--app/Census/CensusColumnFullName.php2
-rw-r--r--app/Census/CensusColumnMarriedWithinYear.php2
-rw-r--r--app/Census/CensusColumnMonthIfMarriedWithinYear.php4
-rw-r--r--app/Census/CensusColumnNationality.php2
-rw-r--r--app/Census/CensusColumnYearsMarried.php4
-rw-r--r--app/Fact.php8
-rw-r--r--app/FactLocation.php2
-rw-r--r--app/Family.php2
-rw-r--r--app/Functions/Functions.php2
-rw-r--r--app/Functions/FunctionsCharts.php4
-rw-r--r--app/Functions/FunctionsPrint.php2
-rw-r--r--app/GedcomRecord.php10
-rw-r--r--app/Http/Controllers/CalendarController.php6
-rw-r--r--app/Http/Controllers/TimelineChartController.php2
-rw-r--r--app/Module/IndividualFactsTabModule.php2
-rw-r--r--app/Module/YahrzeitModule.php6
-rw-r--r--app/Services/CalendarService.php4
-rw-r--r--resources/views/admin/fix-level-0-media-action.phtml2
-rw-r--r--resources/views/modules/relatives/family.phtml10
-rw-r--r--resources/views/modules/sitemap/sitemap-file.xml.phtml2
-rw-r--r--resources/views/modules/todays_events/list.phtml2
-rw-r--r--resources/views/modules/todays_events/table.phtml4
-rw-r--r--resources/views/modules/todo/research-tasks.phtml4
-rw-r--r--resources/views/modules/upcoming_events/list.phtml2
-rw-r--r--resources/views/modules/upcoming_events/table.phtml4
-rw-r--r--resources/views/modules/yahrzeit/list.phtml2
-rw-r--r--resources/views/timeline-chart.phtml2
-rw-r--r--tests/app/Census/CensusColumnAgeMarriedTest.php2
-rw-r--r--tests/app/Census/CensusColumnMarriedWithinYearTest.php6
-rw-r--r--tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php6
-rw-r--r--tests/app/Census/CensusColumnNationalityTest.php4
-rw-r--r--tests/app/Census/CensusColumnYearsMarriedTest.php6
33 files changed, 63 insertions, 63 deletions
diff --git a/app/Census/CensusColumnAgeMarried.php b/app/Census/CensusColumnAgeMarried.php
index b4902d4c07..c33d88a134 100644
--- a/app/Census/CensusColumnAgeMarried.php
+++ b/app/Census/CensusColumnAgeMarried.php
@@ -38,8 +38,8 @@ class CensusColumnAgeMarried extends AbstractCensusColumn implements CensusColum
if ($individual->getBirthDate()->isOK()) {
foreach ($individual->getSpouseFamilies() as $family) {
foreach ($family->getFacts('MARR', true) as $fact) {
- if ($fact->getDate()->isOK()) {
- return (string) Date::getAgeYears($individual->getBirthDate(), $fact->getDate());
+ if ($fact->date()->isOK()) {
+ return (string) Date::getAgeYears($individual->getBirthDate(), $fact->date());
}
}
}
diff --git a/app/Census/CensusColumnFullName.php b/app/Census/CensusColumnFullName.php
index 9fe01c83b9..d285d186a9 100644
--- a/app/Census/CensusColumnFullName.php
+++ b/app/Census/CensusColumnFullName.php
@@ -56,7 +56,7 @@ class CensusColumnFullName extends AbstractCensusColumn implements CensusColumnI
foreach ($individual->getSpouseFamilies() as $family) {
foreach ($family->getFacts('MARR') as $marriage) {
- if ($marriage->getDate()->isOK() && Date::compare($marriage->getDate(), $census_date) < 0) {
+ if ($marriage->date()->isOK() && Date::compare($marriage->date(), $census_date) < 0) {
$spouse = $family->getSpouse($individual);
foreach ($names as $individual_name) {
foreach ($spouse->getAllNames() as $spouse_name) {
diff --git a/app/Census/CensusColumnMarriedWithinYear.php b/app/Census/CensusColumnMarriedWithinYear.php
index be327ccf9f..2ef4f38da4 100644
--- a/app/Census/CensusColumnMarriedWithinYear.php
+++ b/app/Census/CensusColumnMarriedWithinYear.php
@@ -36,7 +36,7 @@ class CensusColumnMarriedWithinYear extends AbstractCensusColumn implements Cens
{
foreach ($individual->getSpouseFamilies() as $family) {
foreach ($family->getFacts('MARR') as $fact) {
- $marriage_jd = $fact->getDate()->julianDay();
+ $marriage_jd = $fact->date()->julianDay();
$census_jd = $this->date()->julianDay();
if ($marriage_jd <= $census_jd && $marriage_jd >= $census_jd - 365) {
return 'Y';
diff --git a/app/Census/CensusColumnMonthIfMarriedWithinYear.php b/app/Census/CensusColumnMonthIfMarriedWithinYear.php
index 52f9e75ab8..176f510464 100644
--- a/app/Census/CensusColumnMonthIfMarriedWithinYear.php
+++ b/app/Census/CensusColumnMonthIfMarriedWithinYear.php
@@ -36,11 +36,11 @@ class CensusColumnMonthIfMarriedWithinYear extends AbstractCensusColumn implemen
{
foreach ($individual->getSpouseFamilies() as $family) {
foreach ($family->getFacts('MARR') as $fact) {
- $marriage_jd = $fact->getDate()->julianDay();
+ $marriage_jd = $fact->date()->julianDay();
$census_jd = $this->date()->julianDay();
if ($marriage_jd <= $census_jd && $marriage_jd >= $census_jd - 365) {
// Use the GEDCOM month, as we need this in English - for the US census
- return ucfirst(strtolower($fact->getDate()->minimumDate()->format('%O')));
+ return ucfirst(strtolower($fact->date()->minimumDate()->format('%O')));
}
}
}
diff --git a/app/Census/CensusColumnNationality.php b/app/Census/CensusColumnNationality.php
index ad8ba65ee4..26581bfb02 100644
--- a/app/Census/CensusColumnNationality.php
+++ b/app/Census/CensusColumnNationality.php
@@ -53,7 +53,7 @@ class CensusColumnNationality extends AbstractCensusColumn implements CensusColu
// Did we emigrate or naturalise?
foreach ($individual->getFacts('IMMI|EMIG|NATU', true) as $fact) {
- if (Date::compare($fact->getDate(), $this->date()) <= 0) {
+ if (Date::compare($fact->date(), $this->date()) <= 0) {
$place = $fact->place()->getGedcomName();
}
}
diff --git a/app/Census/CensusColumnYearsMarried.php b/app/Census/CensusColumnYearsMarried.php
index cd46e2f2d2..1bf08f3b57 100644
--- a/app/Census/CensusColumnYearsMarried.php
+++ b/app/Census/CensusColumnYearsMarried.php
@@ -39,8 +39,8 @@ class CensusColumnYearsMarried extends AbstractCensusColumn implements CensusCol
foreach ($individual->getSpouseFamilies() as $family) {
foreach ($family->getFacts('MARR', true) as $fact) {
- if ($fact->getDate()->isOK() && Date::compare($fact->getDate(), $this->date()) <= 0) {
- $marriage_date = $fact->getDate();
+ if ($fact->date()->isOK() && Date::compare($fact->date(), $this->date()) <= 0) {
+ $marriage_date = $fact->date();
}
}
}
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
diff --git a/app/FactLocation.php b/app/FactLocation.php
index 6c62f7675a..34c3cbad74 100644
--- a/app/FactLocation.php
+++ b/app/FactLocation.php
@@ -91,7 +91,7 @@ class FactLocation extends Location
'url' => $url,
'name' => $name,
'value' => $this->fact->value(),
- 'date' => $this->fact->getDate()->display(true),
+ 'date' => $this->fact->date()->display(true),
'place' => $this->fact->place(),
'addtag' => $addbirthtag,
];
diff --git a/app/Family.php b/app/Family.php
index 8f2d093cec..f9cca0345c 100644
--- a/app/Family.php
+++ b/app/Family.php
@@ -299,7 +299,7 @@ class Family extends GedcomRecord
{
$marriage = $this->getMarriage();
if ($marriage) {
- return $marriage->getDate();
+ return $marriage->date();
}
return new Date('');
diff --git a/app/Functions/Functions.php b/app/Functions/Functions.php
index 1947492d70..0b5d98b82d 100644
--- a/app/Functions/Functions.php
+++ b/app/Functions/Functions.php
@@ -166,7 +166,7 @@ class Functions
foreach ($arr as $event) {
$event->sortOrder = $order;
$order++;
- if ($event->getDate()->isOK()) {
+ if ($event->date()->isOK()) {
$dated[] = $event;
} else {
$nondated[] = $event;
diff --git a/app/Functions/FunctionsCharts.php b/app/Functions/FunctionsCharts.php
index d9a428fb41..fc174aafe2 100644
--- a/app/Functions/FunctionsCharts.php
+++ b/app/Functions/FunctionsCharts.php
@@ -408,10 +408,10 @@ class FunctionsCharts
$div = $famids[$f]->getFirstFact('DIV');
if ($marr) {
// marriage date
- echo $marr->getDate()->minimumDate()->format('%Y');
+ echo $marr->date()->minimumDate()->format('%Y');
// divorce date
if ($div) {
- echo '–', $div->getDate()->minimumDate()->format('%Y');
+ echo '–', $div->date()->minimumDate()->format('%Y');
}
echo '<img class="linea5 lined5 " width="100%" height="3" src="' . Theme::theme()->parameter('image-hline') . '">';
} else {
diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php
index 371a0b37b9..649a86c6f7 100644
--- a/app/Functions/FunctionsPrint.php
+++ b/app/Functions/FunctionsPrint.php
@@ -279,7 +279,7 @@ class FunctionsPrint
// no DEAT.
$death_event = $record->getFirstFact('DEAT');
if ($death_event) {
- $death_date = $death_event->getDate();
+ $death_date = $death_event->date();
} else {
$death_date = new Date('');
}
diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php
index 704d216194..4df2d092ea 100644
--- a/app/GedcomRecord.php
+++ b/app/GedcomRecord.php
@@ -839,12 +839,12 @@ class GedcomRecord
{
foreach ($this->getFacts($facts, true) as $event) {
// Only display if it has a date or place (or both)
- if ($event->getDate()->isOK() && !$event->place()->isEmpty()) {
+ if ($event->date()->isOK() && !$event->place()->isEmpty()) {
$joiner = ' — ';
} else {
$joiner = '';
}
- if ($event->getDate()->isOK() || !$event->place()->isEmpty()) {
+ if ($event->date()->isOK() || !$event->place()->isEmpty()) {
switch ($style) {
case 1:
return '<br><em>' . $event->getLabel() . ' ' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event) . '</em>';
@@ -1070,8 +1070,8 @@ class GedcomRecord
{
$dates = [];
foreach ($this->getFacts($event_type) as $event) {
- if ($event->getDate()->isOK()) {
- $dates[] = $event->getDate();
+ if ($event->date()->isOK()) {
+ $dates[] = $event->date();
}
}
@@ -1163,7 +1163,7 @@ class GedcomRecord
if ($chan) {
// The record does have a CHAN event
- $d = $chan->getDate()->minimumDate();
+ $d = $chan->date()->minimumDate();
if (preg_match('/\n3 TIME (\d\d):(\d\d):(\d\d)/', $chan->getGedcom(), $match)) {
$t = mktime((int) $match[1], (int) $match[2], (int) $match[3], (int) $d->format('%n'), (int) $d->format('%j'), (int) $d->format('%Y'));
} elseif (preg_match('/\n3 TIME (\d\d):(\d\d)/', $chan->getGedcom(), $match)) {
diff --git a/app/Http/Controllers/CalendarController.php b/app/Http/Controllers/CalendarController.php
index 7dd79d0a44..3203a645c4 100644
--- a/app/Http/Controllers/CalendarController.php
+++ b/app/Http/Controllers/CalendarController.php
@@ -271,7 +271,7 @@ class CalendarController extends AbstractBaseController
foreach ($jds as $jd) {
foreach ($this->applyFilter($calendar_service->getAnniversaryEvents($jd, $filterev, $tree), $filterof, $filtersx) as $fact) {
- $tmp = $fact->getDate()->minimumDate();
+ $tmp = $fact->date()->minimumDate();
if ($tmp->day >= 1 && $tmp->day <= $tmp->daysInMonth()) {
// If the day is valid (for its own calendar), display it in the
// anniversary day (for the display calendar).
@@ -508,7 +508,7 @@ class CalendarController extends AbstractBaseController
}
}
// Filter on recent events
- if ($filterof === 'recent' && $fact->getDate()->maximumJulianDay() < $hundred_years) {
+ if ($filterof === 'recent' && $fact->date()->maximumJulianDay() < $hundred_years) {
continue;
}
$filtered[] = $fact;
@@ -527,7 +527,7 @@ class CalendarController extends AbstractBaseController
*/
private function calendarFactText(Fact $fact, bool $show_places): string
{
- $text = $fact->getLabel() . ' — ' . $fact->getDate()->display(true, null, false);
+ $text = $fact->getLabel() . ' — ' . $fact->date()->display(true, null, false);
if ($fact->anniv) {
$text .= ' (' . I18N::translate('%s year anniversary', $fact->anniv) . ')';
}
diff --git a/app/Http/Controllers/TimelineChartController.php b/app/Http/Controllers/TimelineChartController.php
index e8a90a565c..46c7b334fd 100644
--- a/app/Http/Controllers/TimelineChartController.php
+++ b/app/Http/Controllers/TimelineChartController.php
@@ -176,7 +176,7 @@ class TimelineChartController extends AbstractChartController
$fact = $event->getTag();
if (!in_array($fact, self::NON_FACTS)) {
// check for a date
- $date = $event->getDate();
+ $date = $event->date();
if ($date->isOK()) {
$date = new GregorianDate($date->minimumJulianDay());
$baseyear = min($baseyear, $date->year);
diff --git a/app/Module/IndividualFactsTabModule.php b/app/Module/IndividualFactsTabModule.php
index eed5512acf..3c95d1b119 100644
--- a/app/Module/IndividualFactsTabModule.php
+++ b/app/Module/IndividualFactsTabModule.php
@@ -142,7 +142,7 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf
*/
private static function includeFact(Fact $fact, Date $min_date, Date $max_date): bool
{
- $fact_date = $fact->getDate();
+ $fact_date = $fact->date();
return $fact_date->isOK() && Date::compare($min_date, $fact_date) <= 0 && Date::compare($fact_date, $max_date) <= 0;
}
diff --git a/app/Module/YahrzeitModule.php b/app/Module/YahrzeitModule.php
index dc26fd7b8d..a5eb5ae9c5 100644
--- a/app/Module/YahrzeitModule.php
+++ b/app/Module/YahrzeitModule.php
@@ -87,12 +87,12 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface
for ($jd = $startjd - 1; $jd <= $endjd + $days; ++$jd) {
foreach ($calendar_service->getAnniversaryEvents($jd, 'DEAT _YART', $tree) as $fact) {
// Exact hebrew dates only
- $date = $fact->getDate();
+ $date = $fact->date();
if ($date->minimumDate() instanceof JewishDate && $date->minimumJulianDay() === $date->maximumJulianDay()) {
// ...then adjust DEAT dates (but not _YART)
if ($fact->getTag() === 'DEAT') {
$today = new JewishDate($jd);
- $hd = $fact->getDate()->minimumDate();
+ $hd = $fact->date()->minimumDate();
$hd1 = new JewishDate($hd);
$hd1->year += 1;
$hd1->setJdFromYmd();
@@ -126,7 +126,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface
$yahrzeits[] = (object) [
'individual' => $fact->record(),
- 'fact_date' => $fact->getDate(),
+ 'fact_date' => $fact->date(),
'fact' => $fact,
'jd' => $jd,
'yahrzeit_date' => $yahrzeit_date,
diff --git a/app/Services/CalendarService.php b/app/Services/CalendarService.php
index 71fbfa47cd..4afd1c4993 100644
--- a/app/Services/CalendarService.php
+++ b/app/Services/CalendarService.php
@@ -122,7 +122,7 @@ class CalendarService
$anniv_date = new Date($row->d_type . ' ' . $row->d_day . ' ' . $row->d_month . ' ' . $row->d_year);
foreach ($record->getFacts() as $fact) {
// For date ranges, we need a match on either the start/end.
- if (($fact->getDate()->minimumJulianDay() === $anniv_date->minimumJulianDay() || $fact->getDate()->maximumJulianDay() == $anniv_date->maximumJulianDay()) && $fact->getTag() === $row->d_fact) {
+ if (($fact->date()->minimumJulianDay() === $anniv_date->minimumJulianDay() || $fact->date()->maximumJulianDay() == $anniv_date->maximumJulianDay()) && $fact->getTag() === $row->d_fact) {
$fact->anniv = 0;
$found_facts[] = $fact;
}
@@ -380,7 +380,7 @@ class CalendarService
}
$anniv_date = new Date($row->d_type . ' ' . $row->d_day . ' ' . $row->d_month . ' ' . $row->d_year);
foreach ($record->getFacts() as $fact) {
- if (($fact->getDate()->minimumJulianDay() === $anniv_date->minimumJulianDay() || $fact->getDate()->maximumJulianDay() === $anniv_date->maximumJulianDay()) && $fact->getTag() === $row->d_fact) {
+ if (($fact->date()->minimumJulianDay() === $anniv_date->minimumJulianDay() || $fact->date()->maximumJulianDay() === $anniv_date->maximumJulianDay()) && $fact->getTag() === $row->d_fact) {
$fact->anniv = $row->d_year === '0' ? 0 : $anniv->year - $row->d_year;
$fact->jd = $jd;
$found_facts[] = $fact;
diff --git a/resources/views/admin/fix-level-0-media-action.phtml b/resources/views/admin/fix-level-0-media-action.phtml
index 6690fb53ac..d6919d9a3a 100644
--- a/resources/views/admin/fix-level-0-media-action.phtml
+++ b/resources/views/admin/fix-level-0-media-action.phtml
@@ -10,5 +10,5 @@
type="button"
>
<?= $fact->getLabel() ?>
- <?= $fact->getDate()->display(false, '%Y', false) ?>
+ <?= $fact->date()->display(false, '%Y', false) ?>
</button>
diff --git a/resources/views/modules/relatives/family.phtml b/resources/views/modules/relatives/family.phtml
index 80c529df6c..08b0fab15c 100644
--- a/resources/views/modules/relatives/family.phtml
+++ b/resources/views/modules/relatives/family.phtml
@@ -106,13 +106,13 @@
<th scope="row">
</th>
<td>
- <?= GedcomTag::getLabelValue($fact->getTag(), $fact->getDate()->display() . ' — ' . $fact->place()->getFullName()) ?>
+ <?= GedcomTag::getLabelValue($fact->getTag(), $fact->date()->display() . ' — ' . $fact->place()->getFullName()) ?>
</td>
</tr>
<?php
- if (!$prev->isOK() && $fact->getDate()->isOK()) {
- $prev = $fact->getDate();
+ if (!$prev->isOK() && $fact->date()->isOK()) {
+ $prev = $fact->date();
}
}
@@ -146,8 +146,8 @@
}
$next = new Date('');
foreach ($person->getFacts(WT_EVENTS_BIRT, true) as $bfact) {
- if ($bfact->getDate()->isOK()) {
- $next = $bfact->getDate();
+ if ($bfact->date()->isOK()) {
+ $next = $bfact->date();
break;
}
}
diff --git a/resources/views/modules/sitemap/sitemap-file.xml.phtml b/resources/views/modules/sitemap/sitemap-file.xml.phtml
index 451ff3cc32..5a04d15b3f 100644
--- a/resources/views/modules/sitemap/sitemap-file.xml.phtml
+++ b/resources/views/modules/sitemap/sitemap-file.xml.phtml
@@ -4,7 +4,7 @@
<url>
<loc><?= e($record->url()) ?></loc>
<?php if ($record->getFirstFact('CHAN') !== null) : ?>
- <lastmod><?= $record->getFirstFact('CHAN')->getDate()->minimumDate()->Format('%Y-%m-%d') ?></lastmod>
+ <lastmod><?= $record->getFirstFact('CHAN')->date()->minimumDate()->Format('%Y-%m-%d') ?></lastmod>
<?php endif ?>
</url>
<?php endforeach ?>
diff --git a/resources/views/modules/todays_events/list.phtml b/resources/views/modules/todays_events/list.phtml
index 26ac326644..6149117d4a 100644
--- a/resources/views/modules/todays_events/list.phtml
+++ b/resources/views/modules/todays_events/list.phtml
@@ -10,7 +10,7 @@
<?= $record->getSexImage() ?>
<?php endif ?>
<div class="indent">
- <?= $fact->getLabel() . ' — ' . $fact->getDate()->display(true); ?>
+ <?= $fact->getLabel() . ' — ' . $fact->date()->display(true); ?>
<?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?>
<?php if (!$fact->place()->isEmpty()) : ?>
<?= ' — <a href="' . $fact->place()->getURL() . '">' . $fact->place()->getFullName() . '</a>'; ?>
diff --git a/resources/views/modules/todays_events/table.phtml b/resources/views/modules/todays_events/table.phtml
index 05a7f789a6..0d69bb08d1 100644
--- a/resources/views/modules/todays_events/table.phtml
+++ b/resources/views/modules/todays_events/table.phtml
@@ -32,8 +32,8 @@
<?= $record->getSexImage() ?>
<?php endif ?>
</td>
- <td data-sort="<?= $fact->getDate()->julianDay() ?>">
- <?= $fact->getDate()->display(true); ?>
+ <td data-sort="<?= $fact->date()->julianDay() ?>">
+ <?= $fact->date()->display(true); ?>
</td>
<td data-sort="<?= $fact->anniv ?>">
<?= $fact->anniv ?>
diff --git a/resources/views/modules/todo/research-tasks.phtml b/resources/views/modules/todo/research-tasks.phtml
index ec1cb9bd3b..ddd01fc401 100644
--- a/resources/views/modules/todo/research-tasks.phtml
+++ b/resources/views/modules/todo/research-tasks.phtml
@@ -21,8 +21,8 @@
<tbody>
<?php foreach ($tasks as $task) : ?>
<tr>
- <td data-sort="<?= $task->getDate()->julianDay() ?>" class="d-none d-md-table-cell wt-side-block-optional">
- <?= $task->getDate()->display() ?>
+ <td data-sort="<?= $task->date()->julianDay() ?>" class="d-none d-md-table-cell wt-side-block-optional">
+ <?= $task->date()->display() ?>
</td>
<td data-sort="<?= e($task->record()->getSortName()) ?>">
<a href="<?= e($task->record()->url()) ?>">
diff --git a/resources/views/modules/upcoming_events/list.phtml b/resources/views/modules/upcoming_events/list.phtml
index 26ac326644..6149117d4a 100644
--- a/resources/views/modules/upcoming_events/list.phtml
+++ b/resources/views/modules/upcoming_events/list.phtml
@@ -10,7 +10,7 @@
<?= $record->getSexImage() ?>
<?php endif ?>
<div class="indent">
- <?= $fact->getLabel() . ' — ' . $fact->getDate()->display(true); ?>
+ <?= $fact->getLabel() . ' — ' . $fact->date()->display(true); ?>
<?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?>
<?php if (!$fact->place()->isEmpty()) : ?>
<?= ' — <a href="' . $fact->place()->getURL() . '">' . $fact->place()->getFullName() . '</a>'; ?>
diff --git a/resources/views/modules/upcoming_events/table.phtml b/resources/views/modules/upcoming_events/table.phtml
index 05a7f789a6..0d69bb08d1 100644
--- a/resources/views/modules/upcoming_events/table.phtml
+++ b/resources/views/modules/upcoming_events/table.phtml
@@ -32,8 +32,8 @@
<?= $record->getSexImage() ?>
<?php endif ?>
</td>
- <td data-sort="<?= $fact->getDate()->julianDay() ?>">
- <?= $fact->getDate()->display(true); ?>
+ <td data-sort="<?= $fact->date()->julianDay() ?>">
+ <?= $fact->date()->display(true); ?>
</td>
<td data-sort="<?= $fact->anniv ?>">
<?= $fact->anniv ?>
diff --git a/resources/views/modules/yahrzeit/list.phtml b/resources/views/modules/yahrzeit/list.phtml
index bd70ebebac..8642f1510b 100644
--- a/resources/views/modules/yahrzeit/list.phtml
+++ b/resources/views/modules/yahrzeit/list.phtml
@@ -6,7 +6,7 @@
</a>
<?= $yahrzeit->individual->getSexImage() ?>
<div class="indent">
- <?= $yahrzeit->fact->getDate()->display(true) ?>,
+ <?= $yahrzeit->fact->date()->display(true) ?>,
<?= I18N::translate('%s year anniversary', $yahrzeit->fact->anniv) ?>
</div>
<?php endforeach ?>
diff --git a/resources/views/timeline-chart.phtml b/resources/views/timeline-chart.phtml
index 617c1db4c2..c9e65f15cc 100644
--- a/resources/views/timeline-chart.phtml
+++ b/resources/views/timeline-chart.phtml
@@ -276,7 +276,7 @@
<?php foreach ($indifacts as $factcount => $event) : ?>
<?php
$desc = $event->value();
- $gdate = $event->getDate();
+ $gdate = $event->date();
$date = $gdate->minimumDate();
$date = $date->convertToCalendar('gregorian');
$year = $date->year();
diff --git a/tests/app/Census/CensusColumnAgeMarriedTest.php b/tests/app/Census/CensusColumnAgeMarriedTest.php
index 3543617383..94ad4eb568 100644
--- a/tests/app/Census/CensusColumnAgeMarriedTest.php
+++ b/tests/app/Census/CensusColumnAgeMarriedTest.php
@@ -44,7 +44,7 @@ class CensusColumnAgeMarriedTest extends \Fisharebest\Webtrees\TestCase
public function testAgeMarried()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859'));
+ $fact->shouldReceive('date')->andReturn(new Date('01 DEC 1859'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]);
diff --git a/tests/app/Census/CensusColumnMarriedWithinYearTest.php b/tests/app/Census/CensusColumnMarriedWithinYearTest.php
index 101c24ec93..91c3235a5c 100644
--- a/tests/app/Census/CensusColumnMarriedWithinYearTest.php
+++ b/tests/app/Census/CensusColumnMarriedWithinYearTest.php
@@ -44,7 +44,7 @@ class CensusColumnMarriedWithinYearTest extends \Fisharebest\Webtrees\TestCase
public function testMarriedWithinYear()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859'));
+ $fact->shouldReceive('date')->andReturn(new Date('01 DEC 1859'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
@@ -69,7 +69,7 @@ class CensusColumnMarriedWithinYearTest extends \Fisharebest\Webtrees\TestCase
public function testMarriedOverYearBeforeTheCensus()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('01 JAN 1859'));
+ $fact->shouldReceive('date')->andReturn(new Date('01 JAN 1859'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
@@ -94,7 +94,7 @@ class CensusColumnMarriedWithinYearTest extends \Fisharebest\Webtrees\TestCase
public function testMarriedAfterTheCensus()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('02 JUN 1860'));
+ $fact->shouldReceive('date')->andReturn(new Date('02 JUN 1860'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
diff --git a/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php b/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php
index e40e5fcf2c..0401ef76bf 100644
--- a/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php
+++ b/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php
@@ -44,7 +44,7 @@ class CensusColumnMonthIfMarriedWithinYearTest extends \Fisharebest\Webtrees\Tes
public function testMarriedWithinYear()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859'));
+ $fact->shouldReceive('date')->andReturn(new Date('01 DEC 1859'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
@@ -69,7 +69,7 @@ class CensusColumnMonthIfMarriedWithinYearTest extends \Fisharebest\Webtrees\Tes
public function testMarriedOverYearBeforeTheCensus()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('01 JAN 1859'));
+ $fact->shouldReceive('date')->andReturn(new Date('01 JAN 1859'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
@@ -94,7 +94,7 @@ class CensusColumnMonthIfMarriedWithinYearTest extends \Fisharebest\Webtrees\Tes
public function testMarriedAfterTheCensus()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('02 JUN 1860'));
+ $fact->shouldReceive('date')->andReturn(new Date('02 JUN 1860'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
diff --git a/tests/app/Census/CensusColumnNationalityTest.php b/tests/app/Census/CensusColumnNationalityTest.php
index 07f5bd2baf..5cbd4bcd1d 100644
--- a/tests/app/Census/CensusColumnNationalityTest.php
+++ b/tests/app/Census/CensusColumnNationalityTest.php
@@ -124,14 +124,14 @@ class CensusColumnNationalityTest extends \Fisharebest\Webtrees\TestCase
$fact1 = Mockery::mock('Fisharebest\Webtrees\Fact');
$fact1->shouldReceive('place')->andReturn($place1);
- $fact1->shouldReceive('getDate')->andReturn(new Date('1855'));
+ $fact1->shouldReceive('date')->andReturn(new Date('1855'));
$place2 = Mockery::mock('Fisharebest\Webtrees\Place');
$place2->shouldReceive('getGedcomName')->andReturn('Australia');
$fact2 = Mockery::mock('Fisharebest\Webtrees\Fact');
$fact2->shouldReceive('place')->andReturn($place2);
- $fact2->shouldReceive('getDate')->andReturn(new Date('1865'));
+ $fact2->shouldReceive('date')->andReturn(new Date('1865'));
$individual = Mockery::mock('Fisharebest\Webtrees\Individual');
$individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England'));
diff --git a/tests/app/Census/CensusColumnYearsMarriedTest.php b/tests/app/Census/CensusColumnYearsMarriedTest.php
index b82071e58c..f6cc5f5127 100644
--- a/tests/app/Census/CensusColumnYearsMarriedTest.php
+++ b/tests/app/Census/CensusColumnYearsMarriedTest.php
@@ -85,7 +85,7 @@ class CensusColumnYearsMarriedTest extends \Fisharebest\Webtrees\TestCase
public function testUndatedMarriage()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date(''));
+ $fact->shouldReceive('date')->andReturn(new Date(''));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]);
@@ -110,7 +110,7 @@ class CensusColumnYearsMarriedTest extends \Fisharebest\Webtrees\TestCase
public function testMarriageAfterCensus()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('1861'));
+ $fact->shouldReceive('date')->andReturn(new Date('1861'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]);
@@ -135,7 +135,7 @@ class CensusColumnYearsMarriedTest extends \Fisharebest\Webtrees\TestCase
public function testMarriageBeforeCensus()
{
$fact = Mockery::mock('Fisharebest\Webtrees\Fact');
- $fact->shouldReceive('getDate')->andReturn(new Date('OCT 1851'));
+ $fact->shouldReceive('date')->andReturn(new Date('OCT 1851'));
$family = Mockery::mock('Fisharebest\Webtrees\Family');
$family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]);