Intl polyfill for date formatting

This commit is contained in:
DarkCat09 2023-07-31 11:50:27 +04:00
parent 11f5ed6542
commit 23ac4c36b4
3 changed files with 16 additions and 0 deletions

View file

@ -22,6 +22,10 @@ const {
} = Astro.props;
const locale = 'ru-RU';
if (!Intl.DateTimeFormat.supportedLocalesOf(locale)) {
Intl.DateTimeFormat = require('intl').DateTimeFormat;
}
---
<header>