A solution for #1056 to support <html data-date-lang="fa-IR"

This commit is contained in:
the-djmaze 2023-04-04 11:28:15 +02:00
parent fadba0f36a
commit 944a2cb8dc

3
dev/prototype.js vendored
View file

@ -29,7 +29,8 @@
if (hourCycle) {
options.hourCycle = hourCycle;
}
return this.toLocaleString(doc.documentElement.lang, options);
let el = doc.documentElement;
return this.toLocaleString(el.dataset.dateLang || el.lang, options);
};
Element.prototype.closestWithin = function(selector, parent) {