cf.m

cf.m(duration=1, month=1, day=1, hour=0, minute=0, second=0)[source]

Return a time duration of minutes in a cf.TimeDuration object.

cf.m() is equivalent to cf.TimeDuration(1, 'minute').

New in version 1.0.

See also

cf.Y, cf.M, cf.D, cf.h, cf.s

Parameters
duration: number, optional

The number of hours in the time duration.

month, day, hour, minute, second: int, optional

The default date-time elements for defining when a time interval based on this time duration begins or ends. See cf.TimeDuration and cf.TimeDuration.interval for details.

Parameter example:

cf.m(second=30) is equivalent to cf.TimeDuration(1, 'minute', second=30).

Returns
TimeDuration

The new cf.TimeDuration object.

Examples

>>> cf.m()
<CF TimeDuration: PT1M (Y-M-D h:m:00)>
>>> cf.m(30, second=15)
<CF TimeDuration: PT30M (Y-M-D h:m:15)>
>>> cf.m(0.5)
<CF TimeDuration: PT0.5M (Y-M-D h:m:00)>
>>> cf.m(2.5, second=45)
<CF TimeDuration: PT2.5M (Y-M-D h:m:45)>
>>> cf.m(0)
<CF TimeDuration: PT0M (Y-M-D h:m:00)>