正如谷歌支持所说
const startOfDay = new Date();
startOfDay.setHours(0, 0, 0, 0);
const db = firebase.firestore();
db.collection('posts').where('createdAt', '>=', startOfDay)
.get()
.then(querySnapshot => {
querySnapshot.forEach(doc => {
console.log(doc.id, " -> ", doc.data());
});
});
所以,我必须使用 javascript 日期对象
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句