MongoDB Query Dynamic Date Range?

Is anyone aware of a method to write a MongoDB query for a dynamic date-range? 

 

I found this link online, and tried the code below, but it does NOT work in the connector:

...
"order_date" : {
$lt: new Date(),
$gte: new Date(new Date().setDate(new Date().getDate()-1))
}

 

Any thoughts on how we can do something like this in the connector?