Changeset 948
- Timestamp:
- 11/01/2007 03:41:30 PM (13 months ago)
- Files:
-
- 1 modified
-
trunk/system/helpers/date.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/helpers/date.php
r919 r948 107 107 * step - amount to increment each step by 108 108 * long - use 24-hour time 109 * 110 * Returns: 111 * A mirrored (foo => foo) array from 1-12 or 1-24. 112 */ 113 public static function hours($step = 1, $long = FALSE, $start = 0) 109 * start - the hour to start at (24-hour time probably wants a 0 here) 110 * 111 * Returns: 112 * A mirrored (foo => foo) array from start-12 or start-23. 113 */ 114 public static function hours($step = 1, $long = FALSE, $start = 1) 114 115 { 115 116 static $hours; … … 127 128 128 129 // 24-hour time has 24 hours, instead of 12 129 $size = ($long == TRUE) ? 2 4: 12;130 131 for ($i = $start; $i < $size; $i += $step)130 $size = ($long == TRUE) ? 23 : 12; 131 132 for ($i = $start; $i <= $size; $i += $step) 132 133 { 133 134 $hours[$cache][$step][$i] = $i; … … 204 205 public static function months() 205 206 { 206 return self::hours(1, FALSE );207 return self::hours(1, FALSE, 1); 207 208 } 208 209
