diff --git a/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java b/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java
index 3e88046..fdf4707 100644
--- a/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java
+++ b/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java
@@ -32,16 +32,6 @@
 import java.util.Calendar;
 
 public class ZenModeScheduleDaysSelection extends ScrollView {
-    public static final int[] DAYS = {
-        Calendar.SUNDAY,
-        Calendar.MONDAY,
-        Calendar.TUESDAY,
-        Calendar.WEDNESDAY,
-        Calendar.THURSDAY,
-        Calendar.FRIDAY,
-        Calendar.SATURDAY,
-    };
-
     // per-instance to ensure we're always using the current locale
     private final SimpleDateFormat mDayFormat = new SimpleDateFormat("EEEE");
     private final SparseBooleanArray mDays = new SparseBooleanArray();
@@ -61,9 +51,10 @@
         }
         mLayout.setOrientation(LinearLayout.VERTICAL);
         final Calendar c = Calendar.getInstance();
+        int[] daysOfWeek = getDaysOfWeekForLocale(c);
         final LayoutInflater inflater = LayoutInflater.from(context);
-        for (int i = 0; i < DAYS.length; i++) {
-            final int day = DAYS[i];
+        for (int i = 0; i < daysOfWeek.length; i++) {
+            final int day = daysOfWeek[i];
             final CheckBox checkBox = (CheckBox) inflater.inflate(R.layout.zen_schedule_rule_day,
                     this, false);
             c.set(Calendar.DAY_OF_WEEK, day);
@@ -95,6 +86,17 @@
         return rta;
     }
 
+    protected static int[] getDaysOfWeekForLocale(Calendar c) {
+        int[] daysOfWeek = new int[7];
+        int currentDay = c.getFirstDayOfWeek();
+        for (int i = 0; i < daysOfWeek.length; i++) {
+            if (currentDay > 7) currentDay = 1;
+            daysOfWeek[i] = currentDay;
+            currentDay++;
+        }
+        return daysOfWeek;
+    }
+
     protected void onChanged(int[] days) {
         // event hook for subclasses
     }
diff --git a/src/com/android/settings/notification/ZenModeScheduleRuleSettings.java b/src/com/android/settings/notification/ZenModeScheduleRuleSettings.java
index 1c5027e..ad54689 100644
--- a/src/com/android/settings/notification/ZenModeScheduleRuleSettings.java
+++ b/src/com/android/settings/notification/ZenModeScheduleRuleSettings.java
@@ -44,8 +44,6 @@
 import java.util.Arrays;
 import java.util.Calendar;
 
-import static com.android.settings.notification.ZenModeScheduleDaysSelection.DAYS;
-
 public class ZenModeScheduleRuleSettings extends ZenModeRuleSettingsBase {
     private static final String KEY_DAYS = "days";
     private static final String KEY_START_TIME = "start_time";
@@ -158,8 +156,9 @@
         if (days != null && days.length > 0) {
             final StringBuilder sb = new StringBuilder();
             final Calendar c = Calendar.getInstance();
-            for (int i = 0; i < DAYS.length; i++) {
-                final int day = DAYS[i];
+            int[] daysOfWeek = ZenModeScheduleDaysSelection.getDaysOfWeekForLocale(c);
+            for (int i = 0; i < daysOfWeek.length; i++) {
+                final int day = daysOfWeek[i];
                 for (int j = 0; j < days.length; j++) {
                     if (day == days[j]) {
                         c.set(Calendar.DAY_OF_WEEK, day);
