mirror of
https://github.com/friendica/friendica
synced 2025-04-26 23:50:11 +00:00
[frio] On this date option in the archives
This commit is contained in:
parent
8ec3f17138
commit
3e3f48e5ec
3 changed files with 28 additions and 11 deletions
|
@ -470,8 +470,11 @@ class Widget
|
|||
|
||||
if ($dthen) {
|
||||
// Set the start and end date to the beginning of the month
|
||||
$cutoffday = $dthen;
|
||||
$thisday = substr($dnow, 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 +494,7 @@ class Widget
|
|||
|
||||
$ret[$dyear][] = [$str, $end_month, $start_month];
|
||||
$dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,7 +514,10 @@ 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,
|
||||
'$cutoffday' => $cutoffday
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue