Currently, I am working on a project with Meteor and have encountered a small issue. I believe that many of you may already have the solution.
In my setup, I am utilizing MongoDB.
My goal is to retrieve posts that were posted starting from the same date last month up until now.
For example:
today 3rd March
I specifically want posts that were posted between
3rd Feb to 3rd March
I have inserted a date field in the document as follows:
var dat = new Date();
Is it possible to achieve this using the Date field alone, or do we need to store additional fields?
I am currently lacking ideas on how to accomplish this task.
Thank you in advance.