SteemBotAnalysis is a tool developed to analyze :
Only one-day selection was available.The analysis was made on a single day.
A range of selection is available with START DATE and END DATE
With this improvement, it is possible to make the analysis for a longer range of time in one page.
<form action="/action_page.php" class="gwd-form-d3aa">
Start Date:
<input type="date" id="Sday" name="Sday" value="">End Date:
<input type="date" id="Dday" name="Dday" value="">
</form>
With this addition, the date picker also starts from the current date with the PHP code implemented.
var selectedDate = document.getElementById('Sday').value;
var selectedDateUnix = moment(selectedDate, "YYYY-MM-DD").valueOf();
// date range addition
var nextDate = document.getElementById('Dday').value;
var nextDateUnix = moment(nextDate, "YYYY-MM-DD").valueOf();
steem.api.getAccountVotes(bot, function(err, result) {
var accountVotes = result;
// Filter and return all of the account votes between the selected date and the next
var accountVotesFilteredForSelectedDate = _.filter(accountVotes, function(accountVote) {
var accountVoteDateUnix = moment(accountVote.time).valueOf();
return (accountVoteDateUnix >= selectedDateUnix && accountVoteDateUnix <= nextDateUnix);
});
The full code for the project can be found here
Steem Bot Analysis: https://fdsteemtools.neocities.org/botanalysis.html
GitHub: https://github.com/firedreamgames/steembotanalysis
@FireDream - Steemit
@firedream#3528 - Discord
Link to relevant lines in the code on GitHub and explain briefly what you added/changed.