bakineggs / recurring_events_for Goto Github PK
View Code? Open in Web Editor NEWPL/pgSQL function to get the ocurrences of a recurring event
Home Page: http://github.com/danbarry/recurring_events_for
License: Other
PL/pgSQL function to get the ocurrences of a recurring event
Home Page: http://github.com/danbarry/recurring_events_for
License: Other
Hi, I realize this is a long shot as this is an old repo, and not probably being maintained anymore, but I've been reading and experimenting with this solution which led me here.
I have a slight twist in that I'd like to disallow overlapping event timestamps. I was wondering if you had any quick pointers on how to enforce such a change?
I have one more [philosophiocal] doubt in your code.
Let's suppose that the code should contain an attendees table (like Google Calendar), along with metadata. How should I map this table?
The first thing that came to my mind is creating a new table that contains the eventId + startDate, but I'm not sure if I'd be breaking the "do not materialize each event" rule here. Is there a better solution?
Thanks!
First off, great guide! I learned a lot from it. After reading it, I had 2 questions from you:
Obviously, storing individual event instances is a bad idea - but what if you wanted to tie data to a specific instance date? For example, if I have a recurring event that happens every weekday (M-F) of the year. Let's say for one week, a possible attendee would not be at the one on Monday, would be there on Tuesday, not attend Wed/Thu, and would be there on Friday, and bringing a guest? And the following week, the attendance would be on completely different days. How could I tie that information to a specific instance without having an actual record for that instance?
Weekday only recurrence pattern
This is very similar to the question here: #4
--
But I was wondering if there was a way to represent events that recurred on weekdays only, but have a single event? If I'm doing weekdays only, I don't really want a Monday event, Tuesday event, Wednesday event, etc. The other option I suppose would be to make the "day" field an array, but, yuck?
Thanks in advance for the advice!
Hi, I saw there was no license info, so I followed the link to the original source from which this was adapted, and noticed it is released under a Creative Commons Attribution-NonCommercial 2.0 Generic license. It's easy to assume that most stuff on GitHub is MIT but commercial developers may want to be aware of this license restriction.
Hey, @bakineggs, me again!
How did you handle pagination? I mean, if I try to paginate by datetime, we bump into the range being inclusive, e.g. 12:00 -> 17:00, if I request 15:00 -> 19:00, the event would be included again.
Am I missing something here or did you have some way to handle this?
Thanks
Hi @bakineggs!
Thanks for this great repo, it is really helpful!
I'm trying to figure out how can I have multiple days on a weekly recurring event, do I need to create multiple event_recurrence rows for each day?
For instance, if I create an event that happens every Monday and Tuesday every week, I'll end up with two event_recurrences entries, is that correct? Would it make sense to create an array for the "days" column?
Thanks again!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.