Improve datetime display
Use php-intl extension to display datetimes a bit more nicely, depending on the locale. What changes: * the day is no longer displayed * day number and month are ordered according to the locale * the timezone is more readable (UTC+1 instead of CET)
This commit is contained in:
parent
1255a42cfe
commit
52b503105d
8 changed files with 175 additions and 36 deletions
tpl
|
@ -171,10 +171,11 @@
|
|||
<div class="linklist-item-infos-dateblock pure-u-lg-3-8 pure-u-1">
|
||||
<a href="?{$value.shorturl}" title="{'Permalink'|t}">
|
||||
{if="!$hide_timestamps || isLoggedIn()"}
|
||||
{$updated=$value.updated_timestamp ? 'Edited: '. strftime('%c', $value.updated_timestamp) : 'Permalink'}
|
||||
{$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'}
|
||||
<span class="linkdate" title="{$updated}">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
{function="strftime('%c', $value.timestamp)"}{if="$value.updated_timestamp"}*{/if}
|
||||
{$value.created|format_date}
|
||||
{if="$value.updated_timestamp"}*{/if}
|
||||
·
|
||||
</span>
|
||||
{/if}
|
||||
|
|
|
@ -99,11 +99,11 @@
|
|||
<br>
|
||||
{if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if}
|
||||
{if="!$hide_timestamps || isLoggedIn()"}
|
||||
{$updated=$value.updated_timestamp ? 'Edited: '. strftime('%c', $value.updated_timestamp) : 'Permalink'}
|
||||
{$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'}
|
||||
<span class="linkdate" title="Permalink">
|
||||
<a href="?{$value.shorturl}">
|
||||
<span title="{$updated}">
|
||||
{function="strftime('%c', $value.timestamp)"}
|
||||
{$value.created|format_date}
|
||||
{if="$value.updated_timestamp"}*{/if}
|
||||
</span>
|
||||
- permalink
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue