Created
October 28, 2016 04:07
-
-
Save evanxd/02f577805e62dca06f5f7d2dce2d3f27 to your computer and use it in GitHub Desktop.
Sample Code for Querying Data by Date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.query = (data) => { | |
return data.filter(function(item) { | |
return new Date(item.date) > new Date('2016/10/28 11:23:00') && | |
new Date(item.date) < new Date('2016/10/28 11:24:00'); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment