Apply user timezone for the title attribute of .time-ago (#4693)
parent
5e3c6f63be
commit
4c8594d451
|
@ -35,6 +35,7 @@ function main() {
|
||||||
|
|
||||||
[].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {
|
[].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {
|
||||||
const datetime = new Date(content.getAttribute('datetime'));
|
const datetime = new Date(content.getAttribute('datetime'));
|
||||||
|
content.title = dateTimeFormat.format(datetime);
|
||||||
content.textContent = relativeFormat.format(datetime);
|
content.textContent = relativeFormat.format(datetime);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue