From 9b959e3eda0ff6d5ea4299e2c174a43a9159e0e7 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 3 Jan 2025 13:43:59 -0600 Subject: [PATCH] Don't show year for updated dates in current year of project table --- lib/Enums/DateTimeFormat.php | 3 +++ templates/ProjectsTable.php | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Enums/DateTimeFormat.php b/lib/Enums/DateTimeFormat.php index d378690e..8e9de13d 100644 --- a/lib/Enums/DateTimeFormat.php +++ b/lib/Enums/DateTimeFormat.php @@ -25,4 +25,7 @@ enum DateTimeFormat: string{ /** Like Jan 5, 2024 */ case ShortDate = 'M j, Y'; + + /** Like Jan 5 */ + case ShortDateWithoutYear = 'M j'; } diff --git a/templates/ProjectsTable.php b/templates/ProjectsTable.php index ed77750e..77b07f53 100644 --- a/templates/ProjectsTable.php +++ b/templates/ProjectsTable.php @@ -52,7 +52,11 @@ $showEditButton = $showEditButton ?? false; Reviewer->DisplayName) ?> - LastActivityTimestamp->format(Enums\DateTimeFormat::ShortDate->value) ?> + LastActivityTimestamp->format('Y')) == intval(NOW->format('Y'))){ ?> + LastActivityTimestamp->format(Enums\DateTimeFormat::ShortDateWithoutYear->value) ?> + + LastActivityTimestamp->format(Enums\DateTimeFormat::ShortDate->value) ?> +