From 7a1c8a1b61e07d2e1a402b5daf0e7c04c232f655 Mon Sep 17 00:00:00 2001 From: MajorTanya <39014446+MajorTanya@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:26:35 +0100 Subject: [PATCH] Fix pre-1970 upload date display in chapter list (#2779) A user in #2777 was using the ComicInfo.xml Year/Month/Day fields to indicate date of publication for some American comics, which often predate the UNIX Epoch of 1970. They were seeing "N/A" displays because this line of code discarded date information for any time before Jan 1st, 1970. The `toRelativeString` extension function used in the other `relativeDateText` function already accounts for very distant dates (anything >7 days away turns into full date, not relative, regardless of setting, though disabling the relative timestamp setting circumvents this with the same result). Removing this line should not cause any issues as it is purely a display difference and the use case of backdating comics to pre-1970 is worth it in my opinion. --- CHANGELOG.md | 1 + app/src/main/java/eu/kanade/presentation/components/DateText.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 141d1832a..5240b7c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co - Fix shizuku installer not updating installed extensions ([@NGB-Was-Taken](https://github.com/NGB-Was-Taken)) ([#2697](https://github.com/mihonapp/mihon/pull/2697)) - Fix mass migration not using the same search queries as individual migration ([@AntsyLich](https://github.com/AntsyLich)) ([#2736](https://github.com/mihonapp/mihon/pull/2736)) - Fix reader not saving read duration when changing chapter ([@AntsyLich](https://github.com/AntsyLich), [@KotlinHero](https://github.com/KotlinHero)) ([#2784](https://github.com/mihonapp/mihon/pull/2784)) +- Fix pre-1970 upload date display in chapter list ([@MajorTanya](https://github.com/MajorTanya)) ([#2779](https://github.com/mihonapp/mihon/pull/2779)) ## [v0.19.3] - 2025-11-07 ### Improved diff --git a/app/src/main/java/eu/kanade/presentation/components/DateText.kt b/app/src/main/java/eu/kanade/presentation/components/DateText.kt index 4f2d988af..0e22dcc35 100644 --- a/app/src/main/java/eu/kanade/presentation/components/DateText.kt +++ b/app/src/main/java/eu/kanade/presentation/components/DateText.kt @@ -22,7 +22,7 @@ fun relativeDateText( Instant.ofEpochMilli(dateEpochMillis), ZoneId.systemDefault(), ) - .takeIf { dateEpochMillis > 0L }, + .takeIf { dateEpochMillis != 0L }, ) }