Giter Site home page Giter Site logo

byDay Interval about rrule HOT 9 CLOSED

jakubroztocil avatar jakubroztocil commented on May 3, 2024
byDay Interval

from rrule.

Comments (9)

lyschoening avatar lyschoening commented on May 3, 2024

What do you use as the starting date?

from rrule.

jkbrzt avatar jkbrzt commented on May 3, 2024

Setting inc to true might help.

If not, can you show the code you use to get the dates? (Please set the dtstart option to your current time so that it can be reliably reproduced.)

from rrule.

wrack avatar wrack commented on May 3, 2024

Oh that was fast.
The startdate is 01.02.2013.
I use this file to test:
http://pastebin.com/ERmqn6Xv

from rrule.

lyschoening avatar lyschoening commented on May 3, 2024

The problem is that you're using a DAILY frequency. Together with the interval, your rule is every third day if it falls on a Monday. If you want every third Monday, the frequency should be WEEKLY. If you want every third Monday of the month, you should go for a MONTHLY frequency, interval of 1, and +3MO.

from rrule.

wrack avatar wrack commented on May 3, 2024

Ahh I see. The byday rule is just for freq above daily?

from rrule.

lyschoening avatar lyschoening commented on May 3, 2024

In practice, yeah.. there isn't much it's good for with BYDAY.. I mean, it would come in handy if you wanted a pattern like Mon, Wed, Fri, Tue, Thu... And you can still do things like FREQ=DAILY;BYDAY=MO – but you can also do that with WEEKLY.

from rrule.

wrack avatar wrack commented on May 3, 2024

Yea i see.

from rrule.

wrack avatar wrack commented on May 3, 2024

Ok I tested it WEEKLY with the sdate on 01.02.2013 and that rule:
FREQ=WEEKLY;BYDAY=MO;INTERVAL=3;UNTIL=20131101T000000Z;WKST=MO
And it starts not on the first Monday it starts on the third.
If I change the sdate to 04.02.2013 (the first Monday) than it works.
Looks like the script asumes that the first week of the Month allready has a booked Monday.
But this Monday is not in this Month and so not booked.
Mhh u know what i mean?

from rrule.

lyschoening avatar lyschoening commented on May 3, 2024

Since the frequency is WEEKLY, it starts in the week of the start date. Since Feb 1st is the Thursday of the previous week, it won't include that Monday. Since you want some special effect with the first date, you'll want to set the start date to the date of your first repetition.

from 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.