Changeset 8764
- Timestamp:
- 05/04/08 09:24:53 (1 year ago)
- Files:
-
- branches/1.1/lib/helper/DateHelper.php (modified) (1 diff)
- branches/1.1/test/unit/helper/DateHelperTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/helper/DateHelper.php
r7757 r8764 149 149 { 150 150 $string = 'over %years% years'; 151 $parameters['%years%'] = round($distance_in_minutes / 525960);151 $parameters['%years%'] = floor($distance_in_minutes / 525960); 152 152 } 153 153 branches/1.1/test/unit/helper/DateHelperTest.php
r7757 r8764 12 12 require_once($_test_dir.'/unit/sfContextMock.class.php'); 13 13 14 $t = new lime_test(49 3, new lime_output_color());14 $t = new lime_test(494, new lime_output_color()); 15 15 16 16 class sfUser … … 61 61 62 62 $t->is(distance_of_time_in_words($now - 370 * 86400, $now), 'about 1 year', $msg); 63 $t->is(distance_of_time_in_words($now - 4 * 365 * 86400, $now), 'over 4 years', $msg); 63 $t->is(distance_of_time_in_words($now - 4 * 370 * 86400, $now), 'over 4 years', $msg); 64 $t->is(distance_of_time_in_words($now - 1000 * 86400, $now), 'over 2 years', $msg); 64 65 65 66 // format_date()

