cf.minute

cf.minute(value)[source]

Return a comparison object for the minute of the hour of a datetime variable.

In this context, a datetime variable is any object which has a minute attribute.

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

Parameters :
value :

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

Returns :
out : cf.Comparison

The comparison object.

See also

year, month, day, hour, second, dteq, dtge, dtgt, dtne, dtle, dtlt

Examples

>>> d = cf.dt(2002, 6, 16, 18, 30, 0)
>>> d == cf.minute(30)
True
>>> d == cf.minute(cf.le(45))
True
>>> d == cf.minute(7)
False
>>> d == cf.minute(cf.wi(15, 45))
True

Previous topic

cf.hour

Next topic

cf.second

This Page