X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=c18a3041b0568c799a35d10c15954e66a7e1b84d;hb=353be860b700784a0b3ccf9284a22482b90b8ddf;hp=ae3a950132dcf078436bb3710672b7db6f7e0b23;hpb=3385147f25969ba06f7b8efaace41d294c6cae2d;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index ae3a950132..c18a3041b0 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -470,8 +470,13 @@ class Widget if ($dthen) { // Set the start and end date to the beginning of the month + $cutoffday = $dthen; + $thisday = substr($dnow, 4); + $nextday = date('Y-m-d', strtotime($dnow . ' + 1 day')); + $nextday = substr($nextday, 4); $dnow = substr($dnow, 0, 8) . '01'; $dthen = substr($dthen, 0, 8) . '01'; + /* * Starting with the current month, get the first and last days of every @@ -491,6 +496,7 @@ class Widget $ret[$dyear][] = [$str, $end_month, $start_month]; $dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d'); + } } @@ -510,7 +516,11 @@ class Widget '$url' => $url, '$dates' => $ret, '$showless' => DI::l10n()->t('show less'), - '$showmore' => DI::l10n()->t('show more') + '$showmore' => DI::l10n()->t('show more'), + '$onthisdate' => DI::l10n()->t('On this date'), + '$thisday' => $thisday, + '$nextday' => $nextday, + '$cutoffday' => $cutoffday ]); return $o;