@classmethod
def date_data_from_form(cls, form):
    """Translate a :class:`~app.forms.CreateEventForm` or a subclass into a
        dictionary of date data.

        :param form: The form to translate.
        :type form: :class:`~app.forms.CreateEventForm` or a subclasss

        :returns: Date data.
        :rtype: dict
        """
    if not form:
        return {}
    return {'start_date': form.start_date.data, 'end_date': form.end_date.data}
