cf.Data.has_calendar

Data.has_calendar()[source]

Whether a calendar has been set.

Returns
bool

True if the calendar has been set, otherwise False.

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