Merge pull request #13207 from anubis2814/develop

Fix to "on this day"
This commit is contained in:
Hypolite Petovan 2023-06-09 16:15:10 -04:00 committed by GitHub
commit 5386180c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -472,6 +472,8 @@ class Widget
// 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';
@ -517,6 +519,7 @@ class Widget
'$showmore' => DI::l10n()->t('show more'),
'$onthisdate' => DI::l10n()->t('On this date'),
'$thisday' => $thisday,
'$nextday' => $nextday,
'$cutoffday' => $cutoffday
]);

View File

@ -33,7 +33,7 @@ function showHideDates() {
<ul class="datebrowse-ul">
{{if $y|cat:$thisday >= $cutoffday}}
<li class="tool">
<a class="datebrowse-link" href="{{$url}}/{{$y|cat:$thisday}}/{{$y|cat:$thisday}}">{{$onthisdate}}</a>
<a class="datebrowse-link" href="{{$url}}/{{$y|cat:$nextday}}/{{$y|cat:$thisday}}">{{$onthisdate}}</a>
</li>
{{/if}}
{{foreach $arr as $d}}