{{!
    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}}
