Ranges #523
-
I looked everywhere in the documentation, but it looks like there isn't a way to store ranges:
But there is not struct to describe "Event E happens from date&time T1 to date&time T2", i.e. a range. And with this, there is no way to do simple things like:
I require these functions for some project at work, so I'm probably not the only one needing these. So, is it not implemented because:
I am currently working on implementing these, because as I said, I need them. Should I make it a pull request ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I have thought about this before, but not very much. I am open to the idea. As you're working on it anyway, feel free to open a pull request. Worst case is I would prefer a better API. Ultimately I'd like to use the unstable With regard to whether a value is in a certain range, you can actually use |
Beta Was this translation helpful? Give feedback.
I have thought about this before, but not very much. I am open to the idea. As you're working on it anyway, feel free to open a pull request. Worst case is I would prefer a better API. Ultimately I'd like to use the unstable
Step
trait for some functionality, but there is no progress on stabilization there.With regard to whether a value is in a certain range, you can actually use
(a..b).contains(&c)
.