Predicate Date with nuxt

Hi,
I have to filter all the "stages" with a "dateDebut" in 2020.
I tried to do :

const prismicStages= await $prismic.api.query([
$prismic.predicate.at('document.type','stagecustomtype'),
$prismic.predicate.year('my.stagecustomtype.dateDebut', 2020),
{
pageSize:10,
page:1,
orderings: '[my.stagecustomtype.dateDebut desc]',
},
]
);

But Prismic API returned 400.
Thank you for your help.

1 Like

Any Idea ?

Where are you getting predicate.year in the API references?

What field type is dateDebut?

Closest I can see is: prismic.predicate.dateYear( path, year )

2 Likes

Hi,
dateDebut is Timestamp.

1 Like