Skip to content

Commit b78cbbc

Browse files
NateScarletlunny
authored andcommitted
Show locale string on timestamp (#6324)
Resolve #6004
1 parent f125330 commit b78cbbc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

public/js/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,10 @@ $(document).ready(function () {
18921892

18931893
// Show exact time
18941894
$('.time-since').each(function () {
1895+
var time = new Date($(this).attr('title'))
1896+
if (!isNaN(time)){
1897+
$(this).attr('title', time.toLocaleString())
1898+
}
18951899
$(this).addClass('poping up').attr('data-content', $(this).attr('title')).attr('data-variation', 'inverted tiny').attr('title', '');
18961900
});
18971901

0 commit comments

Comments
 (0)