| 1441 |
ariadna |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template core_calendar/humantimeperiod
|
|
|
19 |
|
|
|
20 |
Print a human readable time period.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"startdate": {
|
|
|
25 |
"userdate": "2021-09-01",
|
|
|
26 |
"date": "Tomorrow 12:00 AM",
|
|
|
27 |
"timestamp": "1630512000",
|
|
|
28 |
"ispast": false,
|
|
|
29 |
"isnear": true,
|
|
|
30 |
"nearicon": {
|
|
|
31 |
"extraclasses": "me-0 pb-1",
|
|
|
32 |
"attributes": [
|
|
|
33 |
{"name": "src", "value": "../../../pix/i/warning.svg"},
|
|
|
34 |
{"name": "alt", "value": "Warning"}
|
|
|
35 |
]
|
|
|
36 |
},
|
|
|
37 |
"needtitle": true
|
|
|
38 |
},
|
|
|
39 |
"enddate": {
|
|
|
40 |
"userdate": "2021-09-01",
|
|
|
41 |
"date": "Tomorrow 12:00 AM",
|
|
|
42 |
"timestamp": "1630512000",
|
|
|
43 |
"ispast": false,
|
|
|
44 |
"isnear": true,
|
|
|
45 |
"nearicon": {
|
|
|
46 |
"extraclasses": "me-0 pb-1",
|
|
|
47 |
"attributes": [
|
|
|
48 |
{"name": "src", "value": "../../../pix/i/warning.svg"},
|
|
|
49 |
{"name": "alt", "value": "Warning"}
|
|
|
50 |
]
|
|
|
51 |
},
|
|
|
52 |
"needtitle": true
|
|
|
53 |
}
|
|
|
54 |
}
|
|
|
55 |
}}
|
|
|
56 |
|
|
|
57 |
{{#startdate}}
|
|
|
58 |
{{> core_calendar/humandate }}
|
|
|
59 |
{{/startdate}}
|
|
|
60 |
{{#enddate}} »
|
|
|
61 |
{{> core_calendar/humandate }}
|
|
|
62 |
{{/enddate}}
|