Changeset 3279
- Timestamp:
- 08/06/2008 09:41:49 AM (4 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Calendar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Calendar.php
r3186 r3279 221 221 $month = $week = array(); 222 222 223 // Number of days added. When this reaches 7, start a new month223 // Number of days added. When this reaches 7, start a new week 224 224 $days = 0; 225 225 $week_number = 1; 226 226 227 if (($w = (int) date('w', $first)) > $this->week_start) 227 if (($w = (int) date('w', $first) - $this->week_start) < 0) 228 { 229 $w = 6; 230 } 231 232 if ($w > 0) 228 233 { 229 234 // Number of days in the previous month … … 231 236 232 237 // i = number of day, t = number of days to pad 233 for ($i = $n - $w + $this->week_start + 1, $t = $w - $this->week_start; $t > 0; $t--, $i++)238 for ($i = $n - $w + 1, $t = $w; $t > 0; $t--, $i++) 234 239 { 235 240 // Notify the listeners … … 262 267 } 263 268 264 if (($w = (int) date('w', $last) - $this->week_start) < 6 AND $w > -1) 269 if (($w = (int) date('w', $last) - $this->week_start) < 0) 270 { 271 $w = 6; 272 } 273 274 if ($w >= 0) 265 275 { 266 276 // i = number of day, t = number of days to pad
