Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email date range #26

Closed
emurnane opened this issue Jul 11, 2016 · 2 comments
Closed

Email date range #26

emurnane opened this issue Jul 11, 2016 · 2 comments
Assignees
Labels

Comments

@emurnane
Copy link
Owner

What is the date range of emails included in gameplay? (Emails from start date X through end date Y?)

Please respond in the Comments, and feel free to link to any relevant source code.

@ik226
Copy link
Collaborator

ik226 commented Jul 12, 2016

it is intended to have a range of 29 days of emails.
in imap/imap.js there is a GLOBALS object that has a property called daysOfEmail.
Then, at line 85, it intends to make a Date object with a date that is 29 days ago

var dateXDaysBack = new Date().subtractDays(GLOBALS.daysOfEmail).toDateString();
  imap.search([ 'ALL', ['SINCE', dateXDaysBack] ], function(err, results) {
      ...
  }

But I guess that should not work properly since there is no subtractDays() methods
in Date object.... it should be in such form:

var dateXDaysBack = new Date();
dateXdaysBack.setDate(dateXDaysBack.getDate()-GLOBALS.daysOfEmail);

I will make pull request on this

@emurnane
Copy link
Owner Author

Okay thanks! It would be nice for users to get a choice about what date range they play as a future feature — adding a (currently low priority) issue: #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants