Format datetimes using i18n lang

This commit is contained in:
nimbleghost 2023-07-03 15:24:13 +02:00
parent 7a1488fcd3
commit 311ffc3672
5 changed files with 25 additions and 19 deletions

View file

@ -62,7 +62,7 @@ const Banner = {
const UpgradeDialog = (props) => {
const theme = useTheme();
const { t } = useTranslation();
const { t, i18n } = useTranslation();
const { account } = useContext(AccountContext); // May be undefined!
const [error, setError] = useState("");
const [tiers, setTiers] = useState(null);
@ -233,7 +233,7 @@ const UpgradeDialog = (props) => {
<Trans
i18nKey="account_upgrade_dialog_cancel_warning"
values={{
date: formatShortDate(account?.billing?.paid_until || 0),
date: formatShortDate(account?.billing?.paid_until || 0, i18n.language),
}}
/>
</Alert>