cfunits.Units.istime

Units.istime

True if the units are time units, false otherwise.

Note that reference time units (such as 'days since 2000-12-1') are not time units, nor are calendar years and calendar months.

Examples

>>> Units('days').istime
True
>>> Units('seconds').istime
True
>>> Units('kg').istime
False
>>> Units().istime
False
>>> Units('hours since 2100-1-1', calendar='noleap').istime
False
>>> Units(calendar='360_day').istime
False
>>> Units('calendar_years').istime
False
>>> Units('calendar_months').istime
False