I got some confusion to get the number of dates falls under 1 month or 3 months or 6 months or particular time period. How to do that?. Date format is MM/DD/YYYY. The date range will be added dynamically. Any one please help out to solve this.
for ex
- All (10)
- Last month(6)
- Last 3 months(3)
- Last 6 months(1)
- 12/25/2015 - 01/25/2016 (7)
and my ex Array is
var array = ['01/05/2016','01/08/2016','01/09/2016','01/10/2016','01/11/2016','01/12/2016','12/25/2015','11/25/2015','11/29/2015','10/25/2015'];
var currentDate = '02/04/2016';
I have to loop the array and create li elements. The first li element should tell total count of array and next li element should tell count of dates falls in last one month and next li should tell last 3 month. how to segregate inside loop.