diff --git a/ics.php b/ics.php
index 10e5c96..5b930aa 100644
--- a/ics.php
+++ b/ics.php
@@ -100,6 +100,8 @@ function showresult()
recent = 7;
}
+ var recentonly = params.get("recentonly");
+
var html = "
Evénements à venir
";
html += `${formatdate(new Date)}
`;
html += `En gras: modifié les ${recent} derniers jours
`;
@@ -117,7 +119,7 @@ function showresult()
var group = {};
o.VEVENTS
- .filter(e => e.DTSTART >= (new Date))
+ .filter(e => e.DTSTART >= (new Date) && (!recentonly || e.DTSTAMP >= lastmodified))
.sort( (a,b) => a.DTSTART - b.DTSTART)
.forEach(e => {
var formatteddate = formatdate(e.DTSTART);