Fixed broken predicting birthday year (#93)

This commit is contained in:
Roman Kelesidis 2023-04-01 00:50:29 +07:00 committed by GitHub
parent ebe3e62570
commit 04f9aa82c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -380,7 +380,7 @@ if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled'])
$week_all = true; $week_all = true;
continue; continue;
} }
$week_list[] = profile_url($week) .' <span class="small">('. birthday_age($week['user_birthday']-1) .')</span>'; $week_list[] = profile_url($week) .' <span class="small">('. birthday_age(date('Y-m-d', strtotime('-1 year', strtotime($week['user_birthday'])))) .')</span>';
} }
$week_all = ($week_all) ? '&nbsp;<a class="txtb" href="#" onclick="ajax.exec({action: \'index_data\', mode: \'birthday_week\'}); return false;" title="'. $lang['ALL'] .'">...</a>' : ''; $week_all = ($week_all) ? '&nbsp;<a class="txtb" href="#" onclick="ajax.exec({action: \'index_data\', mode: \'birthday_week\'}); return false;" title="'. $lang['ALL'] .'">...</a>' : '';
$week_list = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $week_list)) . $week_all; $week_list = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $week_list)) . $week_all;

View File

@ -19,7 +19,7 @@ switch($mode)
{ {
foreach($stats['birthday_week_list'] as $week) foreach($stats['birthday_week_list'] as $week)
{ {
$html[] = profile_url($week) .' <span class="small">('. birthday_age($week['user_birthday']) .')</span>'; $html[] = profile_url($week) .' <span class="small">('. birthday_age(date('Y-m-d', strtotime('-1 year', strtotime($week['user_birthday'])))) .')</span>';
} }
$html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $html)); $html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $html));
} }