From 2728ab76c20bd3a8aad785f7634a32a93f817c7a Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Wed, 16 Jun 2021 22:39:32 -0400
Subject: [PATCH] ISTWCMS-4704: pulling back filtering out dates until we
 figure out how to do this in the view

---
 src/Service/UWService.php | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/Service/UWService.php b/src/Service/UWService.php
index 9caa77be..cad12c11 100644
--- a/src/Service/UWService.php
+++ b/src/Service/UWService.php
@@ -427,24 +427,26 @@ class UWService implements UWServiceInterface {
         else {
 
           // If the date is upcoming, meaning greater than right now.
-          if ($date['end_value'] > strtotime("today")) {
-
-            // If this is the same day, get the date and the start
-            // and end times.
-            if ($date['duration'] < '1439') {
-              $start_date = date('l, F j, Y g:i A', $date['value']);
-              $end_date = date('g:i A', $date['end_value']);
-            }
-
-            // This is not the day, get the start and end date with time.
-            else {
-              $start_date = date('l, F j, Y g:i A', $date['value']);
-              $end_date = date('l, F j, Y g:i A', $date['end_value']);
-            }
+          // Taking this out for now, will be putting it back, if
+          // we figure out how to do this in the view.
+          // if ($date['end_value'] > strtotime("today")) {
+
+          // If this is the same day, get the date and the start
+          // and end times.
+          if ($date['duration'] < '1439') {
+            $start_date = date('l, F j, Y g:i A', $date['value']);
+            $end_date = date('g:i A', $date['end_value']);
+          }
 
-            // Add the start and end date with timezone.
-            $return_dates[] = $start_date . ' - ' . $end_date . ' ' . date('T', $date['end_value']);
+          // This is not the day, get the start and end date with time.
+          else {
+            $start_date = date('l, F j, Y g:i A', $date['value']);
+            $end_date = date('l, F j, Y g:i A', $date['end_value']);
           }
+
+          // Add the start and end date with timezone.
+          $return_dates[] = $start_date . ' - ' . $end_date . ' ' . date('T', $date['end_value']);
+         // }
         }
       }
     }
-- 
GitLab