Date / time format

This commit is contained in:
binwiederhier
2026-06-29 22:24:04 -04:00
parent 4c0bd70408
commit c873064cad
46 changed files with 420 additions and 69 deletions
+5 -3
View File
@@ -28,8 +28,9 @@ import Check from "@mui/icons-material/Check";
import Close from "@mui/icons-material/Close";
import { NavLink } from "react-router-dom";
import { UnauthorizedError } from "../app/errors";
import { formatBytes, formatNumber, formatPrice, formatShortDate } from "../app/utils";
import { formatBytes, formatNumber, formatPrice, formatDate } from "../app/utils";
import AccountContext from "./AccountContext";
import { usePrefCache } from "./PrefCache";
import routes from "./routes";
import session from "../app/Session";
import accountApi, { SubscriptionInterval } from "../app/AccountApi";
@@ -63,7 +64,8 @@ const Banner = {
const UpgradeDialog = (props) => {
const theme = useTheme();
const { t, i18n } = useTranslation();
const { t } = useTranslation();
const { dateFormat } = usePrefCache();
const { account } = useContext(AccountContext); // May be undefined!
const [error, setError] = useState("");
const [tiers, setTiers] = useState(null);
@@ -234,7 +236,7 @@ const UpgradeDialog = (props) => {
<Trans
i18nKey="account_upgrade_dialog_cancel_warning"
values={{
date: formatShortDate(account?.billing?.paid_until || 0, i18n.language),
date: formatDate(account?.billing?.paid_until || 0, dateFormat),
}}
/>
</Alert>