Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept different kind of modifiers #254

Merged
merged 5 commits into from
Feb 14, 2017
Merged

Accept different kind of modifiers #254

merged 5 commits into from
Feb 14, 2017

Conversation

gpbl
Copy link
Owner

@gpbl gpbl commented Feb 14, 2017

This PR extends the type of modifiers values. In addition to a function (day: Date) => Bool, modifiers can be now contain:

  • Date objects
  • range objects, e.g.
     { from: new Date(2017, 10, 18), to: new Date(2017, 10, 25) }
  • after/before objects:
    { after: new Date(2017, 10, 18) }
    { before: new Date() }
  • an array of the above.

Using these new values, we can avoid to create new functions at each rendering (see #181) and pre-populate the modifiers with a predefined set of data (see #247).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 99.291% when pulling 57ba9eb on modifiers-day into e433240 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 99.291% when pulling 57ba9eb on modifiers-day into e433240 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f8058e6 on modifiers-day into e433240 on master.

@gpbl gpbl merged commit ecc30be into master Feb 14, 2017
@gpbl gpbl deleted the modifiers-day branch February 14, 2017 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants