Skip to content

Commit

Permalink
Fix capDates
Browse files Browse the repository at this point in the history
  • Loading branch information
Menighin committed Oct 19, 2020
1 parent b4f4037 commit 02edde2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/StockHistoryCrawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 02edde2

Please sign in to comment.