Skip to content

Instantly share code, notes, and snippets.

@r-cyr
Last active June 20, 2016 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-cyr/f0dfcb28e6d44ef2222c3f655610b7fa to your computer and use it in GitHub Desktop.
Save r-cyr/f0dfcb28e6d44ef2222c3f655610b7fa to your computer and use it in GitHub Desktop.
fetch().filter(event => (
var startTime = new Date(event.start_time).getTime();
var eventStart = Date.now() - 21600000;
var eventEnd = Date.now() - 7776000000;
params.location = params.location || event.location;
return (startTime >= eventStart) && (startTime <= eventEnd);
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment