Skip to content

Commit

Permalink
Merge pull request #27 from Locus43/twoMonths
Browse files Browse the repository at this point in the history
Added next month to filtering to show events of current and next month.
  • Loading branch information
Locus43 committed Dec 23, 2023
2 parents 596a6ff + f8e8851 commit 618fc9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/dataParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ public function getEvents(){
}private function parser($data, $topic, $topicInt){
$newsletterText = "";
$currentMonth = date('m');
$nextMonth = date('m',strtotime('first day of +1 month'));
$translatedMonth = translateMonth::translate($currentMonth);
$translatedNextMonth = translateMonth::translate($nextMonth);

if($data != null){
if(!array_key_exists('_event_STATUS', $data)){
Expand All @@ -168,7 +170,7 @@ public function getEvents(){
{
$eventImage = $placeImage;
}
if($month == $translatedMonth){
if($month == $translatedMonth || $month == $translatedNextMonth){
$newsletterText .= "<tr><td style='padding: 10px;'>";
if(!empty($eventImage) && !is_array($eventImage))
{
Expand Down

0 comments on commit 618fc9b

Please sign in to comment.