GithubHelp home page GithubHelp logo

Comments (3)

thisfred avatar thisfred commented on May 23, 2024

This appears to still be the case, and it's in direct conflict with the standard which states:

"""
Recurrence rules may generate recurrence instances with an invalid
date (e.g., February 30) or nonexistent local time (e.g., 1:30 AM
on a day where the local time is moved forward by an hour at 1:00
AM). Such recurrence instances MUST be ignored and MUST NOT be
counted as part of the recurrence set.
"""

https://tools.ietf.org/html/rfc5545

this is what python's dateutil does:

>>> from dateutil.rrule import rrule, MONTHLY
>>> from datetime import datetime
>>> r = rrule(MONTHLY, dtstart=datetime(2016, 1, 30))
>>> r.between(datetime(2017, 1, 1), datetime(2017, 4, 1))
[datetime.datetime(2017, 1, 30, 0, 0), datetime.datetime(2017, 3, 30, 0, 0)]

whereas ical4j displays the behavior described in the previous comment.

from ical4j.

benfortuna avatar benfortuna commented on May 23, 2024

This was a bug but I believe it should now be fixed. The results from the latest release as follows:

20140730T000000/PT0S
20140830T000000/PT0S
20140930T000000/PT0S
20141030T000000/PT0S
20141130T000000/PT0S
20141230T000000/PT0S
20150130T000000/PT0S
20150330T000000/PT0S
20150430T000000/PT0S
20150530T000000/PT0S
20150630T000000/PT0S

You can see with the latest implementation that Feb dates are skipped because there is no Feb 30th.

from ical4j.

thisfred avatar thisfred commented on May 23, 2024

Awesome, thank you for checking back on this!

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.