before uses <= "less than or equal to". That's not BEFORE
benlieb opened this issue · 5 comments
I was having strange results using my_date_field_before, only to discover that <= is used.
Why is this? I don't understand. Is there a way to simply use < with this gem?
You're correct -- the _before, _after, _in_past, _in_future, _inside, _outside methods, all for date times - all assume that you want to do inclusive queries. I've found in practice that we have a use case for that one more often than not. Patches welcome to make it an option.
Hm. That's actually a bit disturbing to me. I love this gem, but that's disturbing. I've used the gem for about a month now, and now I feel I have to go back to a couple of projects and make sure this issue is accounted for.
In my mind before means before. After means after. After today doesn't include today. If I ask a friend to hangout sometime after thursday, and he says, "sure, how about thursday at noon". I'd say "No, AFTER Thursday". Seems clear to me.
Sorry if I sound cranky. I'm having a cranky day.
This gem is full of all sorts of disturbing stuff, man.
fair enough, no plans to make an inclusive/exclusive distinction, then?
Pull requests are welcome!