From 523c1504040c3edf0b20c59adf72fafd9abf24e1 Mon Sep 17 00:00:00 2001 From: Shiva Thapa <89457854+shivathapaa@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:29:08 +0545 Subject: [PATCH] Fix date after ashar 2081 No of days in ashar brought problem for months to come. I have verified changes for this year i.e. 2081. However, will push changes if corrected for year 2082 and more. --- .../kirangyawali/composeNepaliDate/date/NepaliDateUtils.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composeNepaliDate/src/main/java/np/com/kirangyawali/composeNepaliDate/date/NepaliDateUtils.kt b/composeNepaliDate/src/main/java/np/com/kirangyawali/composeNepaliDate/date/NepaliDateUtils.kt index 489fe97..187c120 100644 --- a/composeNepaliDate/src/main/java/np/com/kirangyawali/composeNepaliDate/date/NepaliDateUtils.kt +++ b/composeNepaliDate/src/main/java/np/com/kirangyawali/composeNepaliDate/date/NepaliDateUtils.kt @@ -149,7 +149,7 @@ object NepaliDateUtils { daysInMonthMap.put(2078, intArrayOf(0, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)) daysInMonthMap.put(2079, intArrayOf(0, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)) daysInMonthMap.put(2080, intArrayOf(0, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30)) - daysInMonthMap.put(2081, intArrayOf(0, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30)) + daysInMonthMap.put(2081, intArrayOf(0, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)) daysInMonthMap.put(2082, intArrayOf(0, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30)) daysInMonthMap.put(2083, intArrayOf(0, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30)) daysInMonthMap.put(2084, intArrayOf(0, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30)) @@ -287,7 +287,7 @@ object NepaliDateUtils { startWeekDayMonthMap.put(2078, intArrayOf(0, 4, 7, 3, 6, 3, 6, 2, 4, 5, 7, 1, 3)) startWeekDayMonthMap.put(2079, intArrayOf(0, 5, 1, 4, 1, 4, 7, 3, 5, 6, 1, 2, 4)) startWeekDayMonthMap.put(2080, intArrayOf(0, 6, 2, 6, 2, 6, 2, 4, 6, 1, 2, 3, 5)) - startWeekDayMonthMap.put(2081, intArrayOf(0, 7, 3, 6, 3, 7, 3, 5, 7, 2, 3, 5, 7)) + startWeekDayMonthMap.put(2081, intArrayOf(0, 7, 3, 7, 3, 7, 3, 5, 7, 2, 3, 5, 6)) startWeekDayMonthMap.put(2082, intArrayOf(0, 2, 4, 1, 4, 1, 4, 6, 1, 3, 4, 6, 1)) startWeekDayMonthMap.put(2083, intArrayOf(0, 3, 6, 2, 6, 2, 5, 7, 2, 4, 5, 7, 2)) startWeekDayMonthMap.put(2084, intArrayOf(0, 4, 7, 3, 7, 3, 6, 1, 3, 5, 6, 1, 3)) @@ -469,4 +469,4 @@ internal fun Int.toDigits(base: Int = 10): List = sequence { yield(n % base) n /= base } -}.toList() \ No newline at end of file +}.toList()