serialize method
Implementation
String serialize() {
var out = StringBuffer();
out.write('RRULE:FREQ=$frequency');
if (untilDate != null) {
out.write(';UNTIL=${utils.formatDateTime(untilDate!)}');
}
if (count > 0) {
out.write(';COUNT=$count');
}
if (interval > 0) {
out.write(';INTERVAL=$interval');
}
if (weekday > 0 && weekday < 8) {
out.write(';WKST=${weekdays[weekday - 1]}');
}
out.writecrlf('');
return out.toString();
}