Ticket #1148: year-alternative.diff
File year-alternative.diff, 591 bytes (added by , 19 years ago) |
---|
-
core/meta/fields.py
180 180 elif lookup_type in ('range', 'in'): 181 181 return value 182 182 elif lookup_type == 'year': 183 return ['%s-01-01' % value, '% s-12-31' % value]183 return ['%s-01-01' % value, '%04d-01-01' % (int(value)+1)] 184 184 elif lookup_type in ('contains', 'icontains'): 185 185 return ["%%%s%%" % prep_for_like_query(value)] 186 186 elif lookup_type == 'iexact':