pub(crate) fn convert_datetime_if_necessary<'a>(
    any_calendar: &'a AnyCalendar,
    value: &impl DateTimeInput<Calendar = AnyCalendar>,
) -> Result<Option<DateTime<Ref<'a, AnyCalendar>>>, MismatchedCalendarError>
Expand description

Converts a date to the correct calendar if necessary

Returns Err if the date is not ISO or compatible with the current calendar, returns Ok(None) if the date is compatible with the current calendar and doesn’t need conversion