Changeset 3448
- Timestamp:
- 09/13/2008 11:36:20 AM (3 months ago)
- Files:
-
- 1 modified
-
trunk/system/classes/calendar.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/classes/calendar.php
r3366 r3448 28 28 * Returns an array of the names of the days, using the current locale. 29 29 * 30 * @param boolean return shortnames30 * @param integer left of day names 31 31 * @return array 32 32 */ 33 public static function days($ short = FALSE)33 public static function days($length = TRUE) 34 34 { 35 35 // strftime day format 36 $format = ($ short == TRUE) ? '%a' : '%A';36 $format = ($length > 3) ? '%A' : '%a'; 37 37 38 38 // Days of the week … … 54 54 } 55 55 } 56 elseif ($short == TRUE) 56 57 if (is_int($length) OR ctype_digit($length)) 57 58 { 58 59 foreach ($days as $i => $day) 59 60 { 60 // Shorten the day names to 3 letters61 $days[$i] = substr($day, 0, 3);61 // Shorten the days to the expected length 62 $days[$i] = utf8::substr($day, 0, $length); 62 63 } 63 64 }
