misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux
Rust bittorrent-clientdebriddownload-acceleratordownload-managerdownloadmanagereguifile-downloadergallery-dlidmidm-alternativeinternet-download-managerm3u8-downloadermagnetplaylist-downloaderreal-debridrusttorrent-clientvideo-downloaderyoutube-downloaderyt-dlp
English dates follow the system's 12- or 24-hour clock (#392) (#436)
Anirudh2931e3e20986
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex dd535434..0ce71bd6 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,10 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, see## [Unreleased]+### Changed++- In English, the **Last Try Date** and **Added** columns follow the system's 12- or 24-hour clock: `Oct 28 9:44:12 PM 2026` when Windows uses a 12-hour clock, and **Added** starts wide enough for it ([#392](https://github.com/anefzaoui/misterdownloadmanager/issues/392)).+### Fixed- A download saved under a numbered name because another file already had its name (`master (1).mp4`) now shows that name in the list and opens its own file, instead of keeping the old name and opening the other file ([#442](https://github.com/anefzaoui/misterdownloadmanager/issues/442)). Two downloads waiting under one name no longer collide when they start: the later one takes the next free name, instead of failing with "already being downloaded" or continuing the other one's data.diff --git a/ROADMAP.md b/ROADMAP.mdindex b59b4f33..99023192 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -489,6 +489,8 @@ These ship in a later version, when they're ready.[#339](https://github.com/anefzaoui/misterdownloadmanager/issues/339)): yt-dlp's folder build,unpacked once and checked against its signed list; built and checked on macOS, still toconfirm on a person's Mac+- π In English, the list's dates on the system's 12- or 24-hour clock+ ([#392](https://github.com/anefzaoui/misterdownloadmanager/issues/392)): in review- π Help: when an antivirus or VirusTotal flags MDM- π Linux, what's left ([#164](https://github.com/anefzaoui/misterdownloadmanager/issues/164)):screen readers (Orca) reading MDM's windows; browsers installed as a Flatpak (Firefox fromdiff --git a/crates/app/src/list.rs b/crates/app/src/list.rsindex 83252550..e2980dfc 100644--- a/crates/app/src/list.rs+++ b/crates/app/src/list.rs@@ -70,9 +70,10 @@ pub const ADDED: usize = 8;/// The "Source" column's data slot: its cell is "Web" or "Torrent", painted as a chip.pub const SOURCE: usize = 9;-/// IDM's default column widths (and ours for Added and Source).+/// IDM's default column widths (and ours for Added, room for a 12-hour clock's+/// `Oct 28 9:05:01 AM 2026`, and Source).pub const DEFAULT_WIDTHS: [f32; COLS] = [- 150.0, 20.0, 75.0, 65.0, 75.0, 95.0, 65.0, 200.0, 125.0, 62.0,+ 150.0, 20.0, 75.0, 65.0, 75.0, 95.0, 65.0, 200.0, 145.0, 62.0,];/// Default display order: Source first, then IDM's, with Added after Last Try Date.const DEFAULT_ORDER: [usize; COLS] = [SOURCE, 0, 1, 2, 3, 4, 5, 6, ADDED, 7];diff --git a/crates/app/src/model.rs b/crates/app/src/model.rsindex 3e0dc8ae..6b2f6fa3 100644--- a/crates/app/src/model.rs+++ b/crates/app/src/model.rs@@ -946,26 +946,25 @@ pub fn stamp_time(stored: &str) -> Option<chrono::NaiveDateTime> {}/// A stored stamp as the list shows it: in the formats chosen in Options β Regional; else IDM's-/// own text in English, and the user's Windows region format in other languages (its digits and-/// order; month names would be in the region's language).+/// own text in English (on the system's 12- or 24-hour clock), and the user's Windows region+/// format in other languages (its digits and order; month names would be in the region's+/// language).pub fn date_text(stored: &str) -> String {let Some(t) = stamp_time(stored) else {return stored.to_owned();};- if english() && !crate::regional::current().custom {- return stored.to_owned();- }when_text(t)}/// A local time as the interface writes dates and times (Options β Regional; IDM's text in-/// English; the Windows region's elsewhere).+/// English, on the system's clock; the Windows region's elsewhere).pub fn when_text(t: chrono::NaiveDateTime) -> String {- if crate::regional::current().custom {+ let formats = crate::regional::current();+ if formats.custom {return crate::i18n::ltr(&crate::regional::short_date_time(t));}if english() {- return t.format(STAMP).to_string();+ return stamp_text(t, formats.clock24);}#[cfg(windows)]if let Some(s) = crate::win32::local_date_time(t) {@@ -974,6 +973,18 @@ pub fn when_text(t: chrono::NaiveDateTime) -> String {crate::i18n::ltr(&crate::regional::short_date_time(t))}+/// IDM's text for a time, as stored (`Oct 28 21:44:12 2026`) on a 24-hour clock, and with the+/// system's 12-hour clock (#392) `Oct 28 9:44:12 PM 2026`.+fn stamp_text(t: chrono::NaiveDateTime, clock24: bool) -> String {+ use chrono::Timelike;+ format!(+ "{} {} {}",+ t.format("%b %d"),+ crate::regional::time_text(t.hour(), t.minute(), t.second(), clock24),+ t.format("%Y")+ )+}+/// Whether numbers are written IDM's way (English): `7.05 MB`, `13.38%`, `1 min 22 sec`./// Every other language writes them as its region does (digits, decimal mark, unit names; D-019).fn english() -> bool {@@ -1152,6 +1163,28 @@ mod stamp_tests {assert!(oct < apr, "October 2026 comes before April 2027");assert!(super::stamp_time("not a date").is_none());}++ #[test]+ fn english_stamps_follow_the_clock() {+ let at = |s| super::stamp_time(s).unwrap();+ // 24-hour: exactly as stored.+ for s in ["Oct 28 21:44:12 2026", "Jan 01 00:05:09 2027"] {+ assert_eq!(super::stamp_text(at(s), true), s);+ }+ // 12-hour (#392): midnight and noon are 12.+ assert_eq!(+ super::stamp_text(at("Oct 28 21:44:12 2026"), false),+ "Oct 28 9:44:12 PM 2026"+ );+ assert_eq!(+ super::stamp_text(at("Jan 01 00:05:09 2027"), false),+ "Jan 01 12:05:09 AM 2027"+ );+ assert_eq!(+ super::stamp_text(at("Jun 15 12:00:00 2027"), false),+ "Jun 15 12:00:00 PM 2027"+ );+ }}/// An address as typed: `www.example.com/a.zip` (no scheme, as browsers take it) is read asdiff --git a/docs/languages.md b/docs/languages.mdindex c224c6dc..92eafc1e 100644--- a/docs/languages.md+++ b/docs/languages.md@@ -27,7 +27,7 @@ In Arabic, Hebrew, Persian, Urdu and Uyghur the whole window is mirrored: the me**Numbers** (counts, sizes, speeds, percentages and the list's columns) are written the way the interface language writes them, whatever the Windows region: German `10.200` and `1,50 MB`, French `10 200`, Hindi `1,00,000`. When your system's region is in that same language, its own way wins (Swiss German `10β200`, or a separator you set in Windows). In English, MDM writes plain digits, as IDM does (`10200`, `1.50 MB`).-**Dates and times** in the list (**Last Try Date**, **Added**) and the Scheduler follow the system's region by default (on Windows **Settings β Time & language β Language & region β Regional format**; on macOS and Linux, your language's usual way), or your own date order, clock and first day of the week in [Options β Regional](options.md#regional). In English the list keeps IDM's own date text (`Oct 30 21:44:12 2026`).+**Dates and times** in the list (**Last Try Date**, **Added**) and the Scheduler follow the system's region by default (on Windows **Settings β Time & language β Language & region β Regional format**; on macOS and Linux, your language's usual way), or your own date order, clock and first day of the week in [Options β Regional](options.md#regional). In English the list keeps IDM's own date text (`Oct 30 21:44:12 2026`), on the system's 12- or 24-hour clock (`Oct 30 9:44:12 PM 2026`).A translation longer than the English ends in **...** where it doesn't fit; point at it to read it whole.