fix: dates follow the UI language, not the browser's
Seven sites formatted with a bare toLocaleString()/toLocaleDateString(), so an English UI on a Hungarian machine printed Hungarian-shaped dates (and the reverse). They now go through formatDateTime/formatDate, which take the i18n language.
This commit is contained in:
@@ -7,7 +7,14 @@ import { useLiveQuery } from "../lib/useLiveQuery";
|
||||
import { api, type DownloadJob } from "../lib/api";
|
||||
import { notify } from "../lib/notifications";
|
||||
import { copyText } from "../lib/clipboard";
|
||||
import { formatBytes, formatDuration, formatEta, formatSpeed, relativeTime } from "../lib/format";
|
||||
import {
|
||||
formatBytes,
|
||||
formatDateTime,
|
||||
formatDuration,
|
||||
formatEta,
|
||||
formatSpeed,
|
||||
relativeTime,
|
||||
} from "../lib/format";
|
||||
import { navItemAttrs } from "../lib/listNav";
|
||||
import { failCopyKeys } from "../lib/downloadFailure";
|
||||
|
||||
@@ -250,7 +257,7 @@ export function DownloadRow({
|
||||
{job.status === "done" && job.created_at ? (
|
||||
<span
|
||||
className="text-muted inline-flex items-center gap-1"
|
||||
title={new Date(job.created_at).toLocaleString()}
|
||||
title={formatDateTime(job.created_at)}
|
||||
>
|
||||
· <CalendarClock className="w-3.5 h-3.5" /> {relativeTime(job.created_at)}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user