canjs/can-set

Create a timestamp comparator ~8

Opened this issue · 2 comments

pYr0x commented

the rangeInclusive comparator is weird. i read it several times and do not understand the logic.

it would be nice to make a comparator by passing a momentjs query http://momentjs.com/docs/#/query/ into it.
i know the same can be done by using the rangeInclusive comparator with the unix timestamp, but maybe a feature request.

What don't you understand?

I probably won't add a moment comparator to can-set. It would involve adding moment as a dependency to a project with no external dependencies. Furthermore, it's an object that doesn't directly represent the params passed to a URL. The datetime does though.

I'd be happy to work with you to create a timestamp comparator. And document how momentjs could be used with it.

pYr0x commented

we can talk about it. hit me on skype...