isWithinInterval exclution criteria #2818
Unanswered
p-prins
asked this question in
v3 API ideas
Replies: 2 comments
-
hi @p-prins |
Beta Was this translation helpful? Give feedback.
0 replies
-
hi @p-prins |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Part of the definition of an interval is whether or not the start and the end should be included or not.
[ start, end ] (start and end included)
[ start, end > (start included, end excluded)
< start, end > (start and end excluded)
Currently the isWithinInterval function only allows us to specify the type of interval where the start and end is included. I propose to support the other two types of intervals as well.
To accomplish this I'd like to add a third parameter to the function named options (similar to for example eachDayOfInterval). Options accepts an object which would accept two properties
excludeStart
andexcludeEnd
.I'm happy to make a PR if this will be accepted. Of course, I'm open to other ideas as well on how to implement the proposed feature.
Beta Was this translation helpful? Give feedback.
All reactions