Skip to content
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

Feat: Add some helper functions that will improve the library. #639

Open
Ardent10 opened this issue Sep 29, 2024 · 0 comments
Open

Feat: Add some helper functions that will improve the library. #639

Ardent10 opened this issue Sep 29, 2024 · 0 comments

Comments

@Ardent10
Copy link

I have used this library and made some custom function that came in handy while building my application.
It would be great if we can incorporate these functions within this library so that others don't have to write it again.

here are the list of the function which I created that might help.

  1. generateOccurrences: This will help in generating an object that provides 3 things, ruleStr, rrule, occurrences array. The occurrences array returns object of start and end which are dates of the start of the event and end of the event provided a duration of the event.
  2. getPastOccurrences: This function returns an array of all the events that happened in the past.
  3. getFutureOccurrences: This function returns an array of all the events that are going to happen in the future.
  4. getNextOccurrence: This returns the next event date that is going to happen.
  5. generateCalendarApiRecurrence(Optional): This I created for my own purpose as rrule library is not entirely compatible with the format of the google calendar api recurring event request body. So I created this for compatibility with the rrule that is generated by this library and how the google calendar api rrule is required.

PS: Most of these functions uses the underlying function that are already there in this library but it can definitely make the lives of other developers easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant