]> git.mjollnir.org Git - moodle.git/commitdiff
Merged removal of weeks from format_time from stable
authormoodler <moodler>
Thu, 15 Feb 2007 03:14:40 +0000 (03:14 +0000)
committermoodler <moodler>
Thu, 15 Feb 2007 03:14:40 +0000 (03:14 +0000)
lang/en_utf8/moodle.php
lib/moodlelib.php
user/index.php

index 59a3da9f2318b7584dafc4f65eff38fab66c33bc..e1ab129bbdcbbf8f7d838c9abff318d38ad87551 100644 (file)
@@ -1474,7 +1474,6 @@ $string['visibletostudents'] = 'Visible to $a';
 $string['warningdeleteresource'] = 'Warning: $a is referred in a resource. Would you like to update the resource?';
 $string['webpage'] = 'Web page';
 $string['week'] = 'Week';
-$string['weeks'] = 'weeks';
 $string['weekhide'] = 'Hide this week from $a';
 $string['weeklyoutline'] = 'Weekly outline';
 $string['weekshow'] = 'Show this week to $a';
index d65b5b4146e1528f3e010cd8daaf1eda59a5845f..345b476a907f50471f0c95d91cb7cf86dd5c7248 100644 (file)
@@ -911,7 +911,6 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0,
  * @uses MINSECS
  * @uses HOURSECS
  * @uses DAYSECS
- * @uses WEEKSECS
  * @uses YEARSECS
  * @param int $totalsecs ?
  * @param array $str ?
@@ -932,15 +931,11 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0,
         $str->secs  = get_string('secs');
         $str->year  = get_string('year');
         $str->years = get_string('years');
-        $str->week  = get_string('week');
-        $str->weeks = get_string('weeks');
     }
 
 
     $years     = floor($totalsecs/YEARSECS);
     $remainder = $totalsecs - ($years*YEARSECS);
-    $weeks     = floor($remainder/WEEKSECS);
-    $remainder = $totalsecs - ($weeks*WEEKSECS);
     $days      = floor($remainder/DAYSECS);
     $remainder = $totalsecs - ($days*DAYSECS);
     $hours     = floor($remainder/HOURSECS);
@@ -952,25 +947,21 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0,
     $sm = ($mins == 1)  ? $str->min  : $str->mins;
     $sh = ($hours == 1) ? $str->hour : $str->hours;
     $sd = ($days == 1)  ? $str->day  : $str->days;
-    $sw = ($weeks == 1)  ? $str->week  : $str->weeks;
     $sy = ($years == 1)  ? $str->year  : $str->years;
 
     $oyears = '';
-    $oweeks = '';
     $odays = '';
     $ohours = '';
     $omins = '';
     $osecs = '';
 
     if ($years)  $oyears  = $years .' '. $sy;
-    if ($weeks)  $oweeks  = $weeks .' '. $sw;
     if ($days)  $odays  = $days .' '. $sd;
     if ($hours) $ohours = $hours .' '. $sh;
     if ($mins)  $omins  = $mins .' '. $sm;
     if ($secs)  $osecs  = $secs .' '. $ss;
 
-    if ($years)  return $oyears .' '. $oweeks;
-    if ($weeks)  return $oweeks .' '. $odays;
+    if ($years)  return $oyears .' '. $odays;
     if ($days)  return $odays .' '. $ohours;
     if ($hours) return $ohours .' '. $omins;
     if ($mins)  return $omins .' '. $osecs;
index 007a6c4e30c195f6e4d16c9c7a9db905df59e9a9..889b327d5eae66e40494c7aedbcec94c28343127 100644 (file)
@@ -90,6 +90,8 @@
 
     $strnever = get_string('never');
 
+    $datestring->year  = get_string('year');
+    $datestring->years = get_string('years');
     $datestring->day   = get_string('day');
     $datestring->days  = get_string('days');
     $datestring->hour  = get_string('hour');