User: bug fix with birthday

This commit is contained in:
0x7d5 2021-10-09 19:40:20 +05:00 committed by GitHub
parent f611c89f13
commit 20ca453e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -384,10 +384,12 @@
<td class="label"><span class="nobold">{_"politViews"}:</span></td>
<td class="data">{var $pviews = $user->getPoliticalViews()}{_"politViews_$pviews"}</td>
</tr>
{if $user->getBirthday() != 0}
{if $user->getBirthday() > 0}
<tr>
<td class="label"><span class="nobold">{_"birth_date"}:</span></td>
<td class="data">{date('d F Y',$user->getBirthday())}, {date('Y') - date('Y', $user->getBirthday())} {_"years"}</td>
<td class="data">{date('d F Y',$user->getBirthday())},
{date('m d') >= date('m d', $user->getBirthday()) ? date('Y') - date('Y', $user->getBirthday()) :
(date('m d') < date('m d', $user->getBirthday()) ? date('Y') - date('Y', $user->getBirthday()) - 1)} {_"years"}</td>
</tr>
{/if}
</tbody>