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