CC-2951: Allow users to select the starting day of the week

Added system preference in Preference page for user to select the start day of a week
(defaults to Sunday).

Calendar will utilize this information and update the calendar UI accordingly.
This commit is contained in:
Yuchen Wang 2011-10-19 12:42:22 -04:00
parent 0989a1c13f
commit d9186a3bf2
6 changed files with 70 additions and 3 deletions

View file

@ -485,6 +485,21 @@ class Application_Model_Preference
public static function GetSoundCloudDownloadbleOption() {
return self::GetValue("soundcloud_downloadable");
}
public static function SetWeekStartDay($day) {
self::SetValue("week_start_day", $day);
}
public static function GetWeekStartDay() {
$val = self::GetValue("week_start_day");
if (strlen($val) == 0){
return "0";
} else {
return $val;
}
}
/* User specific preferences start */
/**
* Sets the time scale preference (day/week/month) in Calendar.
@ -533,5 +548,7 @@ class Application_Model_Preference
public static function GetCalendarTimeInterval() {
return self::GetValue("calendar_time_interval", true /* user specific */);
}
/* User specific preferences end */
}