In my database, each object has a dateCreated value of 2015-12-11T11:12:14.635Z
I'm trying to filter this array for the past week and month.
The issue is that if today is March 19th, I want to search from the 11th to the 18th for the last 7 days, starting at 00:00:01 each day.
First, I need to calculate the past week using moment.js based on the current date and then convert it to the required format for filtering data.
In essence, I am looking to determine the dates for the previous week using the current timestamp.