cf.day

cf.day(value)[source]

Return a cf.Query object for date-time days.

In this context, any object which has a day attribute is considered to be a date-time variable.

If value is a cf.Query object then cf.day(value) is equivalent to value.addattr('day'). Otherwise cf.day(value) is equivalent to cf.eq(value, attr='day').

Parameters:
value :

Either the value that the day is to be compared with, or a cf.Query object for testing the day.

Returns:
out : cf.Query

The query object.

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

Previous topic

cf.month

Next topic

cf.hour

This Page