3 ms·
Not copying and pasting that code chunk and wrapping it into a utility function :red-flag: :red-flag: :red-flag:
by jmondi 5y ago
Not copying and pasting that code chunk and wrapping it into a utility function :red-flag: :red-flag: :red-flag:
- prescriptivist 5y agoIt's a contrived example, as I say. The point is constructing intervals and doing the interval range checks requires importing those functions everywhere and constructing shape objects for them to use. Don't read the code literally. Obviously you can wrap them in a your own interval function which does the same thing. So like: function myOwnIntervalBetweenFunction(date, offsetBefore, offsetAfter) Which is more hygienic but my point is I don't have to do that with Ruby ever.