cfdm.core.Data.del_calendar

Data.del_calendar(default=ValueError())[source]

Delete the calendar.

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.set_calendar('360_day')
>>> d.has_calendar()
True
>>> d.get_calendar()
'360_day'
>>> d.del_calendar()
>>> d.has_calendar()
False
>>> d.get_calendar()
ValueError: Can't get non-existent calendar
>>> print(d.get_calendar(None))
None
>>> print(d.del_calendar(None))
None