Answer the question
In order to leave comments, you need to log in
How to select recurring events from the database?
Good day to all. The task is this:
There is an Event model with fields start_date, end_date, repeat. An event can be repeated every day, month, year (information about this is stored in the repeat field). Can you please tell me how to formulate a query to the database in order to receive events from an interval, including those created not in this interval, but providing for repeatability?
Example: Event created on 05/01/2017, repeats every month. I send a request for the dates 06/1/2017-06/30/2017, as a result, I should receive this event in the selection, as a repeating every month.
Thank you for your help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question