From 03a11ff99b89c999e5b290ac71738d83cb44e7fa Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 22 Jan 2017 16:24:13 +0100 Subject: [PATCH] use thursdays for determining week numbers --- .../com/simplemobiletools/calendar/activities/MainActivity.kt | 2 +- .../com/simplemobiletools/calendar/fragments/MonthFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt index 0355fae4c..bafdb8b46 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -243,7 +243,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener { val endMonthName = Formatter.getMonthName(this, endDateTime.monthOfYear) title = "$startMonthName - $endMonthName" } - supportActionBar?.subtitle = "${getString(R.string.week)} ${startDateTime.weekOfWeekyear.toString()}" + supportActionBar?.subtitle = "${getString(R.string.week)} ${startDateTime.plusDays(3).weekOfWeekyear}" } private fun fillYearlyViewPager() { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt index 2780934c3..dfc7bb106 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt @@ -165,7 +165,7 @@ class MonthFragment : Fragment(), MonthlyCalendar { for (i in 0..5) { (mHolder.findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply { - text = "${days[i * 7].weekOfYear}:" + text = "${days[i * 7 + 3].weekOfYear}:" setTextColor(mWeakTextColor) beVisibleIf(displayWeekNumbers) }