cf.hour¶
-
cf.
hour
(value)[source]¶ Return a
cf.Query
object for date-time hours.In this context, any object which has a
hour
attribute is considered to be a date-time variable.If value is a
cf.Query
object thencf.hour(value)
is equivalent tovalue.addattr('hour')
. Otherwisecf.hour(value)
is equivalent tocf.eq(value, attr='hour')
.See also
cf.year
,cf.month
,cf.day
,cf.minute
,cf.second
,cf.dteq
,cf.dtge
,cf.dtgt
,cf.dtne
,cf.dtle
,cf.dtlt
Parameters: - value:
Either the value that the hour is to be compared with, or a
cf.Query
object for testing the hour.
Returns: - out:
cf.Query
The query object.
Examples: >>> d = cf.dt(2002, 6, 16, 18) >>> d == cf.hour(18) True >>> d == cf.hour(cf.le(19)) True >>> d == cf.hour(7) False >>> d == cf.hour(cf.wi(6, 23)) True