Issue #11 - Date time formating.

This commit is contained in:
Daniel Thee Roperto
2016-09-12 14:05:45 +10:00
parent ee771daecf
commit 928b72ba08
3 changed files with 4 additions and 8 deletions

View File

@@ -144,8 +144,8 @@ class outage {
'{{stop}}'
],
[
userdate($this->starttime, get_string('strftimedatetimeshort')),
userdate($this->stoptime, get_string('strftimedatetimeshort')),
userdate($this->starttime, get_string('datetimeformat', 'auth_outage')),
userdate($this->stoptime, get_string('datetimeformat', 'auth_outage')),
],
$str
);

View File

@@ -101,7 +101,7 @@ class manage extends \flexible_table {
$this->add_data([
format_time($outage->get_warning_duration()),
userdate($outage->starttime, get_string('tablerowstarts', 'auth_outage')),
userdate($outage->starttime, get_string('datetimeformat', 'auth_outage')),
format_time($outage->get_duration()),
$title,
$buttons,

View File

@@ -24,6 +24,7 @@
*/
$string['auth_outagedescription'] = 'Auxiliary plugin that warns users about a future outage and prevents them from logging in once the outage starts.';
$string['datetimeformat'] = '%d %h %Y at %I:%M%P';
$string['defaultlayoutcss'] = 'Layout CSS';
$string['defaultlayoutcssdescription'] = 'This CSS code will be used to display the Outage Warning Bar.';
$string['defaultoutageduration'] = 'Outage Duration';
@@ -37,10 +38,6 @@ $string['defaultwarningdescription'] = 'Description';
$string['defaultwarningdescriptiondescription'] = 'Default warning message for outages. Use {{start}} and {{stop}} placeholders as required.';
$string['defaultwarningdescriptionvalue'] = 'There is an scheduled maintenance from {{start}} to {{stop}} and our system will not be available during that time.';
$string['description'] = 'Public Description';
$string['durationseconds'] = 'second(s)';
$string['durationminutes'] = 'minutes(s)';
$string['durationhours'] = 'hour(s)';
$string['durationdays'] = 'day(s)';
$string['menudefaults'] = 'Default Settings';
$string['menumanage'] = 'Manage';
$string['messageoutageongoing'] = 'Our system will be under maintenance until {$a->stop}.';
@@ -61,7 +58,6 @@ $string['tableheaderstarttime'] = 'Starts on';
$string['tableheaderstopsafter'] = 'Stops after';
$string['tableheaderwarnbefore'] = 'Warns before';
$string['tableheadertitle'] = 'Title';
$string['tablerowstarts'] = '%d %h %Y at %H:%M';
$string['textplaceholdershint'] = 'You can use {{start}} and {{stop}} as placeholders on the title/description for the actual start/stop time.';
$string['titleerrorinvalid'] = 'Title cannot be left blank.';
$string['titleerrortoolong'] = 'Title cannot have more than {$a} characters.';