'Returns a two-elements list with the lower and upper bound to be used
with a BETWEEN operator to query a field value using a year lookup
`value` is an int, containing the looked-up year.'

def year_lookup_bounds(self, value):

    first = '%s-01-01    00:00:00'
    second = '%s-12-31    23:59:59.999999'
    return [(first % value), (second % value)]
