I have and array of arrays like this.
var myArray = [
[Sun Jul 24 2016 17:00:00 GMT-0500 (COT), '2', 'Text Text'],
[Sun Jul 12 2016 17:00:00 GMT-0500 (COT), '3', 'Text Text'],
[Mon Jul 07 2016 17:00:00 GMT-0500 (COT), '4', 'Text Text'],
[Sun Jul 01 2016 17:00:00 GMT-0500 (COT), '1', 'Text Text'],
[Sun Jan 01 2016 17:00:00 GMT-0500 (COT), '2', 'Text Text'],
[Sun Jan 02 2016 17:00:00 GMT-0500 (COT), '1', 'Text Text'],
];
So, I want to change some items of these array according to the Dates just like this:
var myArray = [
[Sun Jul 24 2016 17:00:00 GMT-0500 (COT), '4', 'Text Text'],
[Sun Jul 12 2016 17:00:00 GMT-0500 (COT), '3', 'Text Text'],
[Mon Jul 07 2016 17:00:00 GMT-0500 (COT), '2', 'Text Text'],
[Sun Jul 01 2016 17:00:00 GMT-0500 (COT), '1', 'Text Text'],
[Sun Jan 01 2016 17:00:00 GMT-0500 (COT), '1', 'Text Text'],
[Sun Jan 02 2016 17:00:00 GMT-0500 (COT), '2', 'Text Text'],
];
Thanks in advance.
Edit:
What's the logic of these?: Ok, it's about by replace items setting the position of the array into the main array.
For example. If the day is starting the month the number is lower like 1 or 2 and It will increase if the day of the month increse.
Jan 1 will be 1 in the second item.
Jan 2 will be 2
Jan 20 will be 3
Replace the number items.