Changed $date_system value of 3 to be traditional, but non-workday is Friday and...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 1 Nov 2009 08:22:39 +0000 (08:22 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 1 Nov 2009 08:22:39 +0000 (08:22 +0000)
CHANGELOG.txt
config.default.php
includes/ui/ui_view.inc

index 634cd0aa2708604150095584a0c674372b564aca..799facefdee46dd505cfeabf538f7c43ba52773a 100644 (file)
@@ -19,6 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+01-Nov-2009 Joe Hunt
+! Changed $date_system value of 3 to be traditional, but non-workday is Friday 
+  and start of week is Saturday. For DatePicker.
+$ config.default.php
+  /includes/ui/ui_view.inc
+  
 30-Oct-2009 Janusz Dobrowolski
 # Fixed non-default company selection bug on login.
 $ /includes/session.inc
index 6834dbc71fee36ad7ed66c52daa195772fbf6c6a..cfc371708e0dbc6fb7942a21ede0dd04a12b98d3 100644 (file)
@@ -97,7 +97,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_
        $accounts_alpha = 0;
 
        /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
-       2 = Islamic used by other arabic nations */
+       2 = Islamic used by other arabic nations. 3 = traditional, but where non-workday is Friday and start of week is Saturday */
        $date_system = 0;
 
        /* email stock location if order below reorder-level */
index 48ef063e43dd65850e8ed1df704604331ea983ec..8c6bf63bcad55fdbd02f5ae9202cdc112076d8ad 100644 (file)
@@ -708,7 +708,7 @@ function get_js_date_picker()
 
        $how = user_date_format();                              // 0 = us/ca, 1 = eu, au, nz, 2 = jp, sw
        $sep = $dateseps[user_date_sep()];              // date separator
-       $wstart = (($date_system == 1 || $date_system == 2) ? 6 : ($how == 0 ? 0 : 1));                 // weekstart (sun = 0, mon = 1)
+       $wstart = (($date_system == 1 || $date_system == 2 || $date_system == 3) ? 6 : ($how == 0 ? 0 : 1));    // weekstart (sun = 0, mon = 1)
        $months = array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
        $wdays = array(_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa"));
        $wno = _("W"); // week no
@@ -1005,7 +1005,7 @@ function CC() {
           if (dayOfMonth == selectedDay && currentYear == selectedYear && currentMonth == selectedMonth) {
             css_class = 'current';
 ";
-       if ($date_system == 1 || $date_system == 2)
+       if ($date_system == 1 || $date_system == 2 || $date_system == 3)
                $js .= "
           } else if (dayOfWeek == 5) {
 ";