GithubHelp home page GithubHelp logo

Comments (4)

benfortuna avatar benfortuna commented on May 25, 2024

This is potentially fixed now as a result of PR #48.

from ical4j.

voronaam avatar voronaam commented on May 25, 2024

Actually, it is not fixed. After reading the RFC I am not sure what is the expected behaviour here. The problem is that there is one BYSETPOS and two others: BYMONTH and BYMONTHDAY. The author wanted BYSETPOS to apply to the BYMONTHDAY set, but in reality it gets applies to the overall list of candidate dates (selecting the last month in the list only).

RFC has it this way:

   If multiple BYxxx rule parts are specified, then after evaluating the
   specified FREQ and INTERVAL rule parts, the BYxxx rule parts are
   applied to the current set of evaluated occurrences in the following
   order: BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR,
   BYMINUTE, BYSECOND and BYSETPOS; then COUNT and UNTIL are evaluated.

I think the issue here is that BYMONTH rule evaluator breaks out of the FREQ=MONTHLY bound.

from ical4j.

benfortuna avatar benfortuna commented on May 25, 2024

Ok I think this is now working as expected with the latest refactor of recurrence implementation.

For example, using the above rule for period 20150101/20170101 I get:

20150228
20150331
20150930
20151031
20160229
20160331
20160930
20161031

from ical4j.

voronaam avatar voronaam commented on May 25, 2024

Thank you. We will run a set of tests on our side.

from ical4j.

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.