Git Product home page Git Product logo

Comments (7)

craiglittle avatar craiglittle commented on June 1, 2024

Thanks for the report! I'll figure out what's going on when I have a bit of time.

from biz.

craiglittle avatar craiglittle commented on June 1, 2024

@pocman This no longer works because we had to reject empty intervals to avoid an potential obscure DST bug.

Could you explain your use case more? Could you create a "null schedule" object that conforms to the biz API instead?

from biz.

pocman avatar pocman commented on June 1, 2024

@craiglittle that is exactly what I want : an empty (no hours) schedule that implement biz api.
Biz::Schedule.empty would be great. I thought it was possible to create an empty schedule using Biz::Schedule.new !

from biz.

craiglittle avatar craiglittle commented on June 1, 2024

Looking at it more, building this feature is going to introduce a decent amount of complexity for a small use case. I'm more inclined to throw a clearer error when you try to configure a schedule without any hours.

Instead of relying on biz to generate a "null" schedule, why not create your own null object for your use case? Just have it always return zero when you call within, right?

from biz.

craiglittle avatar craiglittle commented on June 1, 2024

This isn't going to be behavior we're going to explicitly support at this time, but I'll keep an open mind if I hear similar use cases in the future. In the meantime, I'd suggest writing your own null object that fits your needs.

from biz.

pocman avatar pocman commented on June 1, 2024

Thanks :-)

from biz.

a-stroyevskiy avatar a-stroyevskiy commented on June 1, 2024

@craiglittle I also would like to have empty schedule for new users.
I think this is normal case, when new user register in application and has empty schedule and can configure it with UI in future.

from biz.

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.