whereYearEqual function
Creates a filter for year-based searches.
property: The property to filter by, either a String or a Function.
value: The DateTime value whose year part is used for the comparison.
Returns a CoffeeQueryFilter configured for year comparison.
Usage Example
whereYearEqual('birthday', DateTime.now())
whereYearEqual((User user) => user.birthday, DateTime(2022))
Implementation
CoffeeQueryFilter whereYearEqual(dynamic property, DateTime value) {
return whereDate(property, DateCompare.year, value.year);
}