Giter Site home page Giter Site logo

Setters for RSet attributes about php-rrule HOT 5 CLOSED

rlanvin avatar rlanvin commented on August 25, 2024
Setters for RSet attributes

from php-rrule.

Comments (5)

rlanvin avatar rlanvin commented on August 25, 2024

Hello, thank you for asking :-) To answer specifically to your 2 suggestions:

  • Creating a RFC string from an RSet is a feature that has been requested multiple times. Indeed it needs to be opinionated. I think the safest way would be to throw an exception if the RSet contains multiple different DTSTART because ignoring different DTSTART might lead to a RSet string representation that would not produce the same results if parsed again into a RSet. Anyway I'd love to have a PR on that, and I can add comment during code review.

  • Adding setters for RSet attributes... probably not. I feel it will expose too much of the internal implementation of the class, and create an alternative way to use the class (instead of using add* methods you would also be able to use set* methods).
    However I think the use case is valid. So what about methods like "removeExDates()" that removes everything, and/or (depending of the use case) other methods like "removeExDate($date)" that only removes the date given as an argument?

As a general rule, I expect the PR to contain tests (which you mentioned) and follow the existing coding style and naming, because I like keeping the code base somewhat consistent. Before accepting any PR I do a code review, and I might request some changes, but as long as your are open to amending your PR there shouldn't be any problem. I'd also ask you to base your PR on the latest master (version 2) because I don't want to maintain a 1.x branch.

Let me know if you have any question/concerns.

from php-rrule.

rickywiens avatar rickywiens commented on August 25, 2024

Sounds great! :) Thanks for the response, we will see what we can cook up.

from php-rrule.

rickywiens avatar rickywiens commented on August 25, 2024

Hey @rlanvin , just wondering if you had a moment to look over my PR?

from php-rrule.

rlanvin avatar rlanvin commented on August 25, 2024

@rickywiens Done 👍

from php-rrule.

rlanvin avatar rlanvin commented on August 25, 2024

@rickywiens I'm closing this ticket now, but feel free to open a PR if you want to work on the first part.

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.