I'm trying to query only things that are less than a day old... in JS this returns true; Why is rethink not returning true, so also not returning any results?
r.db( "db" ).table("table")
.filter( function (item) {
var
now = new Date(),
then = new Date( item.upload_date );
return now - then > 1000*60*60*24
});
I've tried this as well:
r.db( "db" ).table("table")
.filter( function (item) {
var
now = new Date(),
then = new Date( item( "upload_date") );
return now - then > 1000*60*60*24
});
EDIT: It's definitely my item( "upload_date" )
is not returning the date string... what should I be using there instead?