Diff for /loncom/localize/lonlocal.pm between versions 1.18 and 1.21

version 1.18, 2003/10/04 18:13:36 version 1.21, 2003/10/08 18:08:16
Line 210  sub mt (@) { Line 210  sub mt (@) {
 # ============================================================== What language?  # ============================================================== What language?
   
 sub current_language {  sub current_language {
     my $lang=$lh->maketext('language_code');      if ($lh) {
     return ($lang eq 'language_code'?'en':$lang);   my $lang=$lh->maketext('language_code');
    return ($lang eq 'language_code'?'en':$lang);
       }
       return 'en';
 }  }
   
 # ============================================================== What encoding?  # ============================================================== What encoding?
Line 303  sub locallocaltime { Line 306  sub locallocaltime {
  }   }
  $year+=1900;   $year+=1900;
  my $twelve=$twentyfour;   my $twelve=$twentyfour;
    my $ampm;
  if ($twelve>12) {   if ($twelve>12) {
     $twelve-=12;      $twelve-=12;
     $twelve.=$lh->maketext('date_pm');      $ampm=$lh->maketext('date_pm');
  } else {   } else {
     $twelve.=$lh->maketext('date_am');      $ampm=$lh->maketext('date_am');
  }   }
  foreach    foreach 
  ('seconds','minutes','twentyfour','twelve','day','year',   ('seconds','minutes','twentyfour','twelve','day','year',
  'month','weekday') {   'month','weekday','ampm') {
     $format=~s/\$$_/eval('$'.$_)/gse;      $format=~s/\$$_/eval('$'.$_)/gse;
  }   }
  return $format;   return $format;

Removed from v.1.18  
changed lines
  Added in v.1.21


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>