refactor: rename lastweek
This commit is contained in:
parent
6750673779
commit
fe3d2700c7
7
ics.php
7
ics.php
|
@ -99,12 +99,13 @@ function showresult()
|
||||||
{
|
{
|
||||||
recent = 7;
|
recent = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = "<h1>Evénements à venir</h1>";
|
var html = "<h1>Evénements à venir</h1>";
|
||||||
html += "<p>En gras: modifié les " + recent + " derniers jours</p>";
|
html += "<p>En gras: modifié les " + recent + " derniers jours</p>";
|
||||||
var o = ics2json(xhr.responseText);
|
var o = ics2json(xhr.responseText);
|
||||||
|
|
||||||
var lastweek = new Date();
|
var lastmodified = new Date();
|
||||||
lastweek.setDate(lastweek.getDate() - recent);
|
lastmodified.setDate(lastmodified.getDate() - recent);
|
||||||
var group = {};
|
var group = {};
|
||||||
|
|
||||||
o.VEVENTS
|
o.VEVENTS
|
||||||
|
@ -129,7 +130,7 @@ function showresult()
|
||||||
}
|
}
|
||||||
|
|
||||||
var line = `<li title="modifié le ${formatdate(e.DTSTAMP)}"> ${formatteddate}: ${e.SUMMARY}`;
|
var line = `<li title="modifié le ${formatdate(e.DTSTAMP)}"> ${formatteddate}: ${e.SUMMARY}`;
|
||||||
if (e.DTSTAMP >= lastweek)
|
if (e.DTSTAMP >= lastmodified)
|
||||||
{
|
{
|
||||||
line = `<b>${line}</b>`;
|
line = `<b>${line}</b>`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue