From 1e142c4255cf8e734a6202a8ccb072071eadd540 Mon Sep 17 00:00:00 2001 From: MajorTanya <39014446+MajorTanya@users.noreply.github.com> Date: Wed, 16 Sep 2026 19:56:27 +0200 Subject: [PATCH] Fix padded year & 31-clamped month in local source (#3970) --- .../src/main/kotlin/tachiyomi/source/local/LocalSource.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source-local/src/main/kotlin/tachiyomi/source/local/LocalSource.kt b/source-local/src/main/kotlin/tachiyomi/source/local/LocalSource.kt index 1ccb356b9..79e876eec 100644 --- a/source-local/src/main/kotlin/tachiyomi/source/local/LocalSource.kt +++ b/source-local/src/main/kotlin/tachiyomi/source/local/LocalSource.kt @@ -272,8 +272,8 @@ class LocalSource( comicInfo.translator?.let { chapter.scanlator = it.value } // only bother with partial dates if the year is not null, abandon date parsing otherwise - val year = comicInfo.year?.value?.takeIf { it > 0 }?.toString()?.padStart(2, '0') ?: return - val month = (comicInfo.month?.value?.coerceIn(1, 31) ?: 1).toString().padStart(2, '0') + val year = comicInfo.year?.value?.takeIf { it > 0 }?.toString()?.padStart(4, '0') ?: return + val month = (comicInfo.month?.value?.coerceIn(1, 12) ?: 1).toString().padStart(2, '0') val day = (comicInfo.day?.value?.coerceIn(1, 31) ?: 1).toString().padStart(2, '0') val dateInstant = try {