GithubHelp home page GithubHelp logo

bakineggs / recurring_events_for Goto Github PK

View Code? Open in Web Editor NEW
148.0 148.0 31.0 61 KB

PL/pgSQL function to get the ocurrences of a recurring event

Home Page: http://github.com/danbarry/recurring_events_for

License: Other

Ruby 84.22% PLpgSQL 15.78%

recurring_events_for's People

Contributors

bakineggs avatar kjg avatar pd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

recurring_events_for's Issues

Disallow overlapping events

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?

Map metadata

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!

Recurrence pattern for weekdays (Monday-Friday) only, without multiple events?

First off, great guide! I learned a lot from it. After reading it, I had 2 questions from you:

  1. 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?

  2. 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!

License info

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.

Pagination

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

Multiple days on a recurring week

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.