RRuleFormatter

Utility class to write a Recurrence as a RRule and read it back. See RFC2445[https://tools.ietf.org/html/rfc2445#section-4.8.5.4] and https://tools.ietf.org/html/rfc5545#section-3.3.10. Start dates and end dates are formatted to a local time string.

This class is thread-safe.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The timezone used for formatting and parsing end dates (UNTIL attribute), unless the end date uses UTC time (time form #2, section 3.3.5).

Functions

Link copied to clipboard

Format a recurrence to a string recurrence rule and return it. Note that a valid RRule should technically include the DTSTART attribute, but since this attribute is not part of the Recurrence class, it is omitted. This function will also generate the string RRULE:FREQ=NONE for recurrence with a period of Period.NONE, even though this isn't part of the standard.

Link copied to clipboard
fun parse(rrule: String): Recurrence

Parse a RFC 5545 string recurrence rule and return a recurrence. Note that this method is designed to parse only the output of format.