FIxed some format_time changes that I checked in accidentally

This commit is contained in:
moodler
2007-02-15 02:51:40 +00:00
parent 864a2b3414
commit e5da5f70ef
2 changed files with 10 additions and 6 deletions
+3
View File
@@ -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';
+7 -6
View File
@@ -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);