Added a couple of clarifying comments.
[timetracker.git] / WEB-INF / lib / form / Calendar.class.php
index 72da0e4..447a45e 100644 (file)
@@ -63,7 +63,7 @@ class Calendar extends FormElement {
       
       $this->mMonthNames = $i18n->monthNames;
       $this->mWeekDayShortNames = $i18n->weekdayShortNames;
-      $this->weekStartDay = $user->week_start;
+      $this->weekStartDay = $user->getWeekStart();
     }
 
     function setStyle($style) { $this->style = $style; }
@@ -126,6 +126,8 @@ class Calendar extends FormElement {
 
       $str .= "<tr>";
 
+      // TODO: refactor this entire class, as $weekend_start and $weekend_end
+      // are not what their names suggest (debug with non zero week start to see it).
       $weekend_start = 6 - $this->weekStartDay;      // Saturday by default.
       $weekend_end = (7 - $this->weekStartDay) % 7;  // Sunday by default.
       if (defined('WEEKEND_START_DAY')) {