我有一个具有日期属性的实体
@Entity()
export class Foo {
// ...other properties
@Property({ type: DateType })
date = new Date()
}
我想进行查询以查找Foo
来自某个特定日期的所有内容。
例如
async getByDate(someDate: Date) {
const foo = await this.repository.find({
// What should go to get Foo from the same day as `someDate` ?
})
}
我在文档中找不到如何做到这一点。
我也想做诸如“Foo
从某个星期查找”或“Foo
从某个月份查找”之类的事情