diff --git a/package.json b/package.json index fe6c4af..f250a13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cei-crawler", - "version": "2.0.0", + "version": "2.0.1", "description": "Crawler para pegar dados do Canal Eletronico do Investidor", "main": "src/app.js", "repository": { diff --git a/src/lib/StockHistoryCrawler.js b/src/lib/StockHistoryCrawler.js index e9a43d3..271eefe 100644 --- a/src/lib/StockHistoryCrawler.js +++ b/src/lib/StockHistoryCrawler.js @@ -161,7 +161,7 @@ class StockHistoryCrawler { const maxDate = CeiUtils.getDateFromInput(maxDateStr); // Prevent date out of bound if parameter is set - if (options.capDates && endDate < maxDate) + if (options.capDates && endDate > maxDate) endDate = maxDate; domPage(PAGE.END_DATE_INPUT).attr('value', CeiUtils.getDateForInput(endDate));