Skip to content

Instantly share code, notes, and snippets.

@Haraldson
Created July 10, 2014 09:42
Show Gist options
  • Save Haraldson/abb5687832a6014a684c to your computer and use it in GitHub Desktop.
Save Haraldson/abb5687832a6014a684c to your computer and use it in GitHub Desktop.
How to combine the three first filters, when { live: false } isn’t an option?
// Drafts
filter: {
scheduled: false,
published: false
}
// Scheduled
filter: {
scheduled: true,
published: false
}
// Published
filter: {
scheduled: true,
published: true,
liveStartDate: '[' + Date.now() + ' TO Infinity]'
}
// Live
filter: {
published: true,
liveStartDate: '[0 TO ' + Date.now() + ']'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment