cfdm.Data.del_calendar¶
- Data.del_calendar(default=ValueError())[source]¶
Delete the calendar.
See also
- Parameters:
- default: optional
Return the value of the default parameter if the calendar has not been set. If set to an
Exception
instance then it will be raised instead.
- Returns:
str
The value of the deleted calendar.
Examples
>>> d = cfdm.Data(1, "days since 2000-1-1", calendar="noleap") >>> d.del_calendar() 'noleap' >>> print(d.del_calendar()) None
>>> d = cfdm.Data(1, "days since 2000-1-1") >>> print(d.del_calendar()) None
>>> d = cfdm.Data(1, "m") Traceback (most recent call last): ... ValueError: Units <Units: m> have no calendar