When you test between two dates is it inclusive of those dates?
eg.
IF date is between 9/12/17 and 12/1/17
then if the date is 9/12 or 12/1 the result is true?
When you test between two dates is it inclusive of those dates?
eg.
IF date is between 9/12/17 and 12/1/17
then if the date is 9/12 or 12/1 the result is true?
Just tested both. What I found is the following :
When today was the beginning of the interval, it evaluated true. When it was the end of the interval, it evaluated false.
Not sure it’s the desired behavior tho…
Interesting. I didn’t expect that.
Thanks for testing and doing something my lazy ass didn’t.
Bug, I don’t know. Desired behaviour, probably not. Maybe WebCoRE is using midnight for its calculations (or similar threshold) to calculate and since I was past midnight, it evaluated false when we could expect true.
if it was past midnight and the end of interval date was yesterday’s date, sounds like the desired behavior was exactly as it should be.
wouldnt want to confuse users that may see this thread in the future.
No no, end of interval was today. I must have explained myself badly, sorry!. 2017-09-12 as end of interval returned false. All I wanted to say is that maybe WebCoRE use midnight as reference point and that would cause the bug/unexpected behaviour. Reference point (I.e. Time used for calculations) should/could be 23:59:59 of the day specified as end date.
If someone can make sense out of it, WebCoRE used as reference point 1505245144898 when 2017-09-12 is used as end of interval.
Log being : Comparison (date) 1505188800000 is_between (date) 1473622744985 … (date) 1505245144898 = false (8ms)
Log being : Comparison (date) 1505188800000 is_between (date) 1473622744985 … (date) 1505245144898 = false (8ms)
are those even valid timestamps … seems kind of large?
maybe groovy does not use epoch.
epoch in milliseconds … nice!
i think this is the link for posterity:
https://www.epochconverter.com/
thank you.