Browse Source

Show locale string on timestamp (#6324)

Resolve #6004
for-closed-social
NateScarlet 5 years ago
committed by Lunny Xiao
parent
commit
b78cbbcaa2
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      public/js/index.js

+ 4
- 0
public/js/index.js View File

@ -1892,6 +1892,10 @@ $(document).ready(function () {
// Show exact time // Show exact time
$('.time-since').each(function () { $('.time-since').each(function () {
var time = new Date($(this).attr('title'))
if (!isNaN(time)){
$(this).attr('title', time.toLocaleString())
}
$(this).addClass('poping up').attr('data-content', $(this).attr('title')).attr('data-variation', 'inverted tiny').attr('title', ''); $(this).addClass('poping up').attr('data-content', $(this).attr('title')).attr('data-variation', 'inverted tiny').attr('title', '');
}); });

Loading…
Cancel
Save