Code Monkey home page Code Monkey logo

Comments (2)

rlanvin avatar rlanvin commented on July 25, 2024

I think it doesn't make sense :)

Well, I understand your point, but this is how the RFC has been specified, and how a recurrence set works. The COUNT applies to the RRULE only, not the entire set.

To make things clearer, here are some examples:

  • If you create a set with 2 rules, one with COUNT 5 and the other with COUNT 10, the total occurrences will be anywhere between 10 (if rule 1 is fully included in rule 2) and 15 (if the 2 rules are completely different).
  • If you create a set with 1 rule with COUNT 5, and then add 1 RDATE (not part of the rrule) then the total number of occurrences will be 6.
  • If you create a set with 1 rule with COUNT 5 and then add 1 EXDATE (part of the rule) then the total number of occurrences will be 4.
  • And so on.

If you want the behavior you are describing, I suggest you remove the COUNT altogether and instead select only the first 5 occurrences (use getOccurrences(5) for example).

I hope this makes sense to you now.

from php-rrule.

coffeduong avatar coffeduong commented on July 25, 2024

This make sense now :) Thank you very much!

from php-rrule.

Related Issues (20)

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.