Changeset 2657 for trunk/system/helpers/date.php
- Timestamp:
- 05/07/2008 11:08:35 AM (7 months ago)
- Files:
-
- 1 modified
-
trunk/system/helpers/date.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/helpers/date.php
r2656 r2657 380 380 continue; 381 381 } 382 elseif ($amount === 1)383 {384 // Make the name singualr385 $name = inflector::singular($name);386 }387 388 if ($name === $last)389 {390 // Add "and"391 $amount = 'and '.$amount;392 }393 382 394 383 // Add the amount to the span 395 $span[] = $amount.' '.$name;384 $span[] = ($name === $last ? ' and ' : ', ').$amount.' '.($amount === 1 ? inflector::singular($name) : $name); 396 385 } 397 386 398 $difference = implode(', ', $span).' ago'; 387 // Replace difference by making the span into a string 388 $difference = trim(implode('', $span), ',').' ago'; 399 389 } 400 390
