Development

#3322: DateHelper-patch2.diff

You must first sign up to be able to contribute.

Ticket #3322: DateHelper-patch2.diff

File DateHelper-patch2.diff, 0.7 kB (added by paulom, 5 months ago)
  • lib/helper/DateHelper.php

    old new  
    141141    $string = '%months% months'; 
    142142    $parameters['%months%'] = round($distance_in_minutes / 43200); 
    143143  } 
    144   else if ($distance_in_minutes >= 525960 && $distance_in_minutes <= 1051919) 
    145   { 
    146     $string = 'about 1 year'; 
    147   } 
    148144  else 
    149145  { 
    150     $string = 'over %years% years'; 
    151146    $parameters['%years%'] = floor($distance_in_minutes / 525960); 
     147    $string = 'over %years% year' . ($parameters['%years%'] > 1 ? 's':''); 
    152148  } 
    153149 
    154150  if (sfConfig::get('sf_i18n'))