mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
cleanup namings
This commit is contained in:
parent
59b35084c6
commit
97b0c53bc8
@ -4,17 +4,15 @@ function formatDate(date: string | null) {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
// hour:'2-digit',
|
||||
// minute: '2-digit',
|
||||
}).format(new Date(date));
|
||||
}
|
||||
|
||||
if ('Intl' in window) {
|
||||
window.addEventListener('load', () => {
|
||||
for(const span of [...document.querySelectorAll('.localizable-date')]) {
|
||||
var persianDate = formatDate(span.getAttribute('title'));
|
||||
if (persianDate) {
|
||||
span.innerHTML = persianDate;
|
||||
const localizedDate = formatDate(span.getAttribute('title'));
|
||||
if (localizedDate) {
|
||||
span.innerHTML = localizedDate;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user