View Source CalDAVClient.ICalendar.Serializer (caldav_client v2.0.0)

Serializes datetimes according to CalDAV specification.

Link to this section Summary

Functions

Serializes DateTime.t/0 shifted to UTC timezone to ISO 8601 basic string, e.g. "20210401T123000Z" (see RFC 5545, section 3.3.5).

Serializes DateTime.t/0 or raises on errors. See serialize_datetime/1 for more information.

Serializes NaiveDateTime.t/0 to ISO 8601 basic string, e.g. "20210401T123000" (see RFC 5545, section 3.3.5).

Link to this section Functions

Link to this function

serialize_datetime(datetime)

View Source

Specs

serialize_datetime(DateTime.t()) :: {:ok, String.t()} | {:error, any()}

Serializes DateTime.t/0 shifted to UTC timezone to ISO 8601 basic string, e.g. "20210401T123000Z" (see RFC 5545, section 3.3.5).

Link to this function

serialize_datetime!(datetime)

View Source

Specs

serialize_datetime!(DateTime.t()) :: String.t()

Serializes DateTime.t/0 or raises on errors. See serialize_datetime/1 for more information.

Link to this function

serialize_naive_datetime(naive_datetime)

View Source

Specs

serialize_naive_datetime(NaiveDateTime.t()) :: String.t()

Serializes NaiveDateTime.t/0 to ISO 8601 basic string, e.g. "20210401T123000" (see RFC 5545, section 3.3.5).