From 4e66f12f6fabcd9b8a962888356cfd32ea55649c Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Sat, 22 Jun 2024 20:50:25 +0200 Subject: [PATCH] sort by liturgical memorial when we have enough data about the actual event dates, we can sort by event dates --- src/AnniversaryCalculator.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AnniversaryCalculator.php b/src/AnniversaryCalculator.php index 1312a892..8999099b 100644 --- a/src/AnniversaryCalculator.php +++ b/src/AnniversaryCalculator.php @@ -182,10 +182,11 @@ private function readData() } } } - + //TODO: we currently sort by liturgical memorial day / month, because that's the data we started with, + // however it would be more useful, once the data is defined, to sort by event day / month $props = [ - "month" => 2, - "day" => 1 + "memorialMonth" => 2, + "memorialDay" => 1 ]; usort($this->RESPONSE->LitEvents, function ($a, $b) use ($props) { foreach ($props as $key => $val) {