diff --git a/sentinel-2.js b/sentinel-2.js index 09ebe71..7e14764 100644 --- a/sentinel-2.js +++ b/sentinel-2.js @@ -301,8 +301,8 @@ function filterOnePerMonth(collection) { var month = 1; var images = []; - while (year <= 2021) { - while ((month <= 12 && year != 2021) || month <= 5) { + while (year <= int(new Date().getFullYear())) { + while (month <= 12) { var start = year + "-" + ("0" + month).slice(-2) + "-01"; var end = year + "-" + ("0" + (month + 1)).slice(-2) + "-01"; if (month == 12) {