I have an object array using the following model:
export interface Data { id: number qt: number date: string }
I use Akita's store and I would like to filter my object table so that I only have the results for the last 30 days.
qtLastMonth(): Observable<Data[]> {
return this.selectAll().pipe(
map((allDatas) => allDatas.filter(data =>
moment(data.date).format('DD-MM-YYYY') >
moment().subtract(30, "days").format('DD-MM-YYYY'))
))
}
However I get an output of an object table with dates later than the last 30 days ...
Maybe something is missing?