canjs / can-query-logic

Perform data queries and compare queries against each other. Provides logic useful for data caching and real-time behavior.

Home Page:https://canjs.com/doc/can-query-logic.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isSubset with date types doesn't work right

justinbmeyer opened this issue · comments

queryLogic.isSubset({
    "filter": {
        "dueDate": {
            "$gte": "Mon May 24 2021 21:34:01 GMT-0500 (Central Daylight Time)",
            "$lt": "Tue May 25 2021 21:34:01 GMT-0500 (Central Daylight Time)"
        }
    },
    "page": {
        "start": "0",
        "end": "9"
    }
}, {})

This seems like it's a problem with .intersection between two date types wrapped with GT and LT.

comparisons.GreaterThanEqual.test = nullIsFalseTwoIsOk(function(a, b) {
	return a >= b;
});

This is passed two {value: Date}