HEX
Server: LiteSpeed
System: Linux server41.shared.spaceship.host 4.18.0-553.70.1.lve.el8.x86_64 #1 SMP Wed Aug 20 14:42:18 UTC 2025 x86_64
User: pymuuvxdio (4386)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/pymuuvxdio/sks-edu.net/sks/calendar/templates/humantimeperiod.mustache
{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template core_calendar/humantimeperiod

    Print a human readable time period.

    Example context (json):
    {
        "startdate": {
            "userdate": "2021-09-01",
            "date": "Tomorrow 12:00 AM",
            "timestamp": "1630512000",
            "ispast": false,
            "isnear": true,
            "nearicon": {
                "extraclasses": "me-0 pb-1",
                "attributes": [
                    {"name": "src", "value": "../../../pix/i/warning.svg"},
                    {"name": "alt", "value": "Warning"}
                ]
            },
            "needtitle": true
        },
        "enddate": {
            "userdate": "2021-09-01",
            "date": "Tomorrow 12:00 AM",
            "timestamp": "1630512000",
            "ispast": false,
            "isnear": true,
            "nearicon": {
                "extraclasses": "me-0 pb-1",
                "attributes": [
                    {"name": "src", "value": "../../../pix/i/warning.svg"},
                    {"name": "alt", "value": "Warning"}
                ]
            },
            "needtitle": true
        }
    }
}}

{{#startdate}}
    {{> core_calendar/humandate }}
{{/startdate}}
{{#enddate}} &raquo;
    {{> core_calendar/humandate }}
{{/enddate}}