Skip to content

Commit

Permalink
Merge pull request #4 from effone/worng-weekday
Browse files Browse the repository at this point in the history
Wrong Weekday Correction
  • Loading branch information
effone authored Dec 25, 2020
2 parents 3e2e211 + 8413bc1 commit d851506
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/inc/plugins/birthday_week.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ function birthday_week_populate()
if ($groupscache[$bdayuser['displaygroup']] && $groupscache[$bdayuser['displaygroup']]['showinbirthdaylist'] != 1) {
continue;
}
$daym = explode("-", $bdayuser['birthday']);
$age = ' ('.date("D", mktime(0,0,0,$daym[1],$daym[0],my_date('Y', TIME_NOW, '', 0))).')'; // We can show birthday here
// Manipulate to show day of the week in place of age here
$age = ' ('.date("D", strtotime('midnight', strtotime(sprintf("this week +%u days", array_search($bdayuser['bday'], $birthweek))))).')';

$bdayuser['username'] = format_name(htmlspecialchars_uni($bdayuser['username']), $bdayuser['usergroup'], $bdayuser['displaygroup']);
$bdayuser['profilelink'] = build_profile_link($bdayuser['username'], $bdayuser['uid']);
Expand Down

0 comments on commit d851506

Please sign in to comment.