lets be smart and determine if sunday should be the first day

This commit is contained in:
tibbi 2016-09-09 19:35:26 +02:00
parent 6f928bdeb3
commit 7f783da9c5
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@ package com.simplemobiletools.calendar;
import android.content.Context;
import android.content.SharedPreferences;
import java.util.Locale;
public class Config {
private SharedPreferences mPrefs;
@ -31,7 +33,8 @@ public class Config {
}
public boolean getIsSundayFirst() {
return mPrefs.getBoolean(Constants.SUNDAY_FIRST, false);
boolean isSundayFirst = java.util.Calendar.getInstance(Locale.getDefault()).getFirstDayOfWeek() == java.util.Calendar.SUNDAY;
return mPrefs.getBoolean(Constants.SUNDAY_FIRST, isSundayFirst);
}
public void setIsSundayFirst(boolean sundayFirst) {