【发布时间】:2017-08-24 16:56:15
【问题描述】:
我有两个 unix 时间戳,一个开始时间 (startDate) 和一个结束时间 (endDate)。使用下面的 moment 函数为我提供了一天的开始/结束:
search = {
"end": { "$lte": moment(endDate).startOf('day').unix() },
"start": {"$gte": moment(startDate).startOf('day').unix() }
};
然后我将搜索传递给我的 buildfire 函数:
buildfire.publicData.search(search ,'routes', (err, res) => {})
我的 res 是一个对象数组,每个对象都有一个 data 属性和一个 start 和 end 属性里面:
res = [
{
data: {
end: 1503554370297,
start: 1503554368711
}
}
]
所有结果都返回,没有任何内容被过滤。
【问题讨论】:
标签: buildfire