cf.M¶
-
cf.
M
(duration=1, month=1, day=1, hour=0, minute=0, second=0)[source]¶ Return a time duration of calendar months in a
cf.TimeDuration
object.cf.M()
is equivalent tocf.TimeDuration(1, 'calendar_month')
.New in version 1.0.
Parameters: - duration: number, optional
The number of calendar months in the time duration.
- year, month, day, hour, minute, second:
int
, optional The default date-time elements for defining the start and end of a time interval based on this time duration. See
cf.TimeDuration
andcf.TimeDuration.interval
for details.- Parameter example:
cf.M(day=16)
is equivalent tocf.TimeDuration(1, 'calendar_months', day=16)
.
Returns: TimeDuration
The new
cf.TimeDuration
object.
Examples:
>>> cf.M() <CF TimeDuration: P1M (Y-M-01 00:00:00)> >>> cf.M(3, day=16) <CF TimeDuration: P3M (Y-M-16 00:00:00)> >>> cf.M(24, day=2, hour=12, minute=30, second=2) <CF TimeDuration: P24M (Y-01-02 12:30:02)> >>> cf.M(0) <CF TimeDuration: P0M (Y-M-01 00:00:00)>