-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve working with RRULE #171
Comments
Also, I need some way to ask questions to the RRULE such as: // (I know is ugly it suppose to go away 😄 )
// from https://github.com/teambition/rrule-go
rOption, err := rrule.StrToROption(v)
if err != nil {
return nil, err
}
if rOption.Freq != rrule.MONTHLY || rOption.Interval != 1 || len(rOption.Bymonthday) != 1 || rOption.Bymonthday[0] != 1 {
return nil, errInvalidRRrule
} Since we have some temporary rules So maybe create some object for the |
Here is an example of the data structure (I removed the type Frequency int
// Constants
const (
YEARLY Frequency = iota
MONTHLY
WEEKLY
DAILY
HOURLY
MINUTELY
SECONDLY
)
type RRule struct {
Freq Frequency
Interval int
Wkst Weekday
Count int
Until time.Time
Bysetpos []int
Bymonth []int
Bymonthday []int
Byyearday []int
Byweekno []int
Byweekday []Weekday
Byhour []int
Byminute []int
Bysecond []int
Byeaster []int
} |
Here is another good example: https://hexdocs.pm/vobject/ICalendar.RRULE.html |
You say you like the way I'm asking because I feel that excal is a better way of getting actual iCalendar spec compatibility and much better performance. Coktail was my first attempt at this problem, but has several problems as you may be finding out. So I'm wondering if maybe the better effort should be spent bringing |
@doughsay take everything keeping in mind that I don't have much experience in the topic.
Because I need to ask some questions to the RRULE object, this ugly part: if rOption.Freq != rrule.MONTHLY || rOption.Interval != 1 || len(rOption.Bymonthday) != 1 || rOption.Bymonthday[0] != 1 {
return nil, errInvalidRRrule
} So This is temporary btw. And second, I thought I am not gonna act that paranoid, a simple NIF mistake could mean the entire VM is down, which raises the question, do I really want the performance or the usage of a NIF for this? I don't know the NIF used in the package that well, but that is not the main reason at all. (Also, I thought in using https://github.com/dashbitco/nimble_parsec in order to parse things but I honestly don't have time at the moment) |
Second post about the topic in general, Making |
Hey folks, thanks a lot for such an amazing package, I am currently using it only for the
RRULE
part of it, which for that I love what you did here: https://hexdocs.pm/excal/Excal.Recurrence.Stream.html#content it is super clean and easy to follow when it comes to the RRULE part of it.I wonder if you can bring such API and functionality at the RRULE level into this package. Or write some documentation about suggesting what are the differences and when to use what, since you maintain both of them so would helpful for folks like me that are not that educated about icalendar spec and the topic in general.
Thanks in advance.
The text was updated successfully, but these errors were encountered: