Return a comparison object for the day of the month of a datetime variable.
In this context, a datetime variable is any object which has a day attribute.
If value is a cf.Comparison object then cf.day(value) is equivalent to value.addattr('day'). Otherwise cf.day(value) is equivalent to cf.eq(value, attr='day').
Parameters : |
|
---|---|
Returns : |
|
Examples
>>> d = cf.dt(2002, 6, 16)
>>> d == cf.day(16)
True
>>> d == cf.day(cf.le(19))
True
>>> d == cf.day(7)
False
>>> d == cf.day(cf.wi(1, 21))
True