Use local times for post dates
This commit is contained in:
9
public/assets/index.js
Normal file
9
public/assets/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
(function() {
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const times = document.querySelectorAll('time');
|
||||
times.forEach((time) => {
|
||||
const oldDtime = Date.parse(time.dateTime);
|
||||
time.innerHTML = new Date(oldDtime).toLocaleDateString(navigator.language, { weekday:"long", year:"numeric", month:"short", day:"numeric"});
|
||||
});
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user