Last active
August 29, 2015 14:07
-
-
Save erwan/2bdf83055d57f35d5d85 to your computer and use it in GitHub Desktop.
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
Prismic.Api('https://lesbonneschoses.prismic.io/api', function(err, Api) { | |
Api.form('everything').ref(Api.master()).query( | |
Predicates.at("document.type", "blog-post"), | |
Predicates.dateAfter("my.blog-post.date", new Date(2014, 6, 1)) | |
).submit(function(err, response) { | |
// All documents of type "product", updated after June 1st, 2014 | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just a tiny little nitpickery: the
Date
object created here is in July, not June, due to the weird Date constructor whose month indices are zero-based (i.e. January is month 0).