No difference between .le and .lt while Filtering

 if(until)
        newFilter = newFilter.le('_createdDate', until);

There seems to be no difference when I apply the Filter for less than or equal to as it only filters the dataset same as .lt

I have the dates 05/06/2018 i.e. 5th June 2018 and when I select 5th June 2018 in my Page Date Picker I get the values until the previous date i.e. 4th June 2018

On the other hand .ge is working fine and returning Dates which are equal to or greater than

You need to make sure that the time part of the Date doesn’t cause the problem. Check for UTC or local time.

I do not think the time is causing a problem.

I just made an entry into the Database as below which shows the Date as 7th June 2018 10:58

This is the Details on the Page which shows the time as 7th June 10:58:20 GMT+0400

Now, when I filter —>

Below I searched for dates equal to or before 7th June 2018 which is today


As you can see above, the entry made minutes ago is not shown

But when I search for 8th June 2018, the entry I made mere minutes ago showed up


\

Seems like the most common problem with this is keeping track of UTC versus local time zone. You can check what date/time using console.log() statements.