From e5da5f70efd49d041d0ec10b80d0db62da070948 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 15 Feb 2007 02:51:40 +0000 Subject: [PATCH] FIxed some format_time changes that I checked in accidentally --- lang/en_utf8/moodle.php | 3 +++ lib/moodlelib.php | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 108d6d82ac7..59a3da9f231 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -1474,6 +1474,7 @@ $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'; @@ -1513,6 +1514,8 @@ $string['writinguserinfo'] = 'Writing users info'; $string['wrongpassword'] = 'Incorrect password for this username'; $string['xmldbeditor'] = 'XMLDB editor'; $string['yahooid'] = 'Yahoo ID'; +$string['year'] = 'year'; +$string['years'] = 'years'; $string['yes'] = 'Yes'; $string['youareabouttocreatezip'] = 'You are about to create a zip file containing'; $string['youaregoingtorestorefrom'] = 'You are about to start the restore process for'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0071a49df6d..d65b5b4146e 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -906,15 +906,16 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, /** * Given an amount of time in seconds, returns string - * formatted nicely as months, days, hours etc as needed + * formatted nicely as weeks, days, hours etc as needed * * @uses MINSECS * @uses HOURSECS * @uses DAYSECS + * @uses WEEKSECS + * @uses YEARSECS * @param int $totalsecs ? * @param array $str ? * @return string - * @todo Finish documenting this function */ function format_time($totalsecs, $str=NULL) { @@ -929,11 +930,11 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, $str->mins = get_string('mins'); $str->sec = get_string('sec'); $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'); } - $str->year = 'year'; - $str->years = 'years'; - $str->week = 'week'; - $str->weeks = 'weeks'; $years = floor($totalsecs/YEARSECS);