pub(crate) fn datetime_to_ical_format(dt: &DateTime) -> String {
    let mut tz_prefix = String::new();
    let mut tz_postfix = String::new();
    let tz = dt.timezone();
    if tz == Tz::UTC {
        tz_postfix = "Z".to_string();
    } else {
        tz_prefix = format!(";TZID={}", tz.name());
    };

    let dt = dt.format("%Y%m%dT%H%M%S");
    format!("{}:{}{}", tz_prefix, dt, tz_postfix)
}
/// Generates an iCalendar date-time string format with the prefix symbols.
/// Like: `:19970714T173000Z` or `;TZID=America/New_York:19970714T133000`
/// ref: <https://tools.ietf.org/html/rfc5545#section-3.3.5>
Generates an iCalendar date-time string format with the prefix symbols.
Generates an iCalendar date - time string format with the prefix symbols .
pub(crate) fn datetime_to_ical_format(dt: &DateTime) -> String {
    let mut tz_prefix = String::new();
    let mut tz_postfix = String::new();
    let tz = dt.timezone();
    if tz == Tz::UTC {
        tz_postfix = "Z".to_string();
    } else {
        tz_prefix = format!(";TZID={}", tz.name());
    };
    let dt = dt.format("%Y%m%dT%H%M%S");
    format!("{}:{}{}", tz_prefix, dt, tz_postfix)
}
pub ( crate ) fn datetime_to_ical_format ( dt : & DateTime ) -> String { let mut tz_prefix = String :: new ( ) ; let mut tz_postfix = String :: new ( ) ; let tz = dt . timezone ( ) ; if tz == Tz :: UTC { tz_postfix = " " . to_string ( ) ; } else { tz_prefix = format ! ( " " tz name ( ) ) ; } ; let dt = dt . format ( " " ) ; format ! ( " " tz_prefix dt tz_postfix ) }
Generates an iCalendar date-time string format with the prefix symbols.
Generates an iCalendar date - time string format with the prefix symbols .
dt
&DateTime
dt
&DateTime