Skip to content

Commit

Permalink
FIxed some format_time changes that I checked in accidentally
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Feb 15, 2007
1 parent 864a2b3 commit e5da5f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions lang/en_utf8/moodle.php
Expand Up @@ -1474,6 +1474,7 @@
$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';
Expand Down Expand Up @@ -1513,6 +1514,8 @@
$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';
Expand Down
13 changes: 7 additions & 6 deletions lib/moodlelib.php
Expand Up @@ -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) {

Expand All @@ -929,11 +930,11 @@ function format_time($totalsecs, $str=NULL) {
$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);
Expand Down

0 comments on commit e5da5f7

Please sign in to comment.