serialize method

String serialize()

Implementation

String serialize() {
  final buffer = StringBuffer();
  buffer.write('FREQ=${frequency.name.toUpperCase()};INTERVAL=$interval');
  if (until != null) {
    buffer.write(';UNTIL=${formatDateTime(until!)}');
  }
  if (byDay != null && byDay!.isNotEmpty) {
    buffer.write(';BYDAY=${byDay!.join(',')}');
  }
  return buffer.toString();
}