change bootstrap frozen time for #2319#2471
Conversation
|
@polkadotazn Thank you 👍 I tried it out and it works great! However, when the date is more than 30 days in the past, both the tooltip and the date show the same long date: As you can see, it is so long that it got ellipsed out. In that case, I think the date displayed on the comment block should be more concise (for example only day, month and year), while the tooltip can show the full format including the time and "UTC". You can try this case by manually changing the date of a comment with a SQL request such as |
|
I see. good catch, thanks! I updated the past 30 days dates! I'm not sure if this was the best way to do it, so please let me know if there's a better method :) |
src/View/Helper/DateHelper.php
Outdated
|
|
||
| if ($diff->days > 30) { | ||
| $formattedDate = $dateObj->nice(); | ||
| $formattedDate = $dateObj->i18nFormat([\IntlDateFormatter::LONG, \IntlDateFormatter::SHORT]); |
There was a problem hiding this comment.
This code results in the following:

I think you could as well remove the time:
$formattedDate = $dateObj->i18nFormat([\IntlDateFormatter::LONG, \IntlDateFormatter::NONE]);The rationale is that we are not displaying the time for dates between 1 and 30 days ago, so we shouldn’t display it for dates older than 30 days ago too.
There was a problem hiding this comment.
that makes sense!
|
alrighty how's it looking now? @jiru |
|
@polkadotazn Perfect! 👍 Thanks again 😄 |



Hi, I'm really sorry it has taken so long. I ended up making a new branch for this issue. Please let me know how it looks. @trang @jiru @AndiPersti