Ernest,
It seems that the ArrayList you are storing is not string and result (2016-08-04 = 2004) is calculated at that instance and stored. Storing string within the array-list would solve the issue.
If your arraylist looks like al4 = [2016-07-25, 2016-07-26, 2016-08-01, 2016-08-02, 2016-08-03, 2016-08-04, 2016-08-05, 2016-08-08, 2016-08-09, 2016-08-10];
changing it to al4 = ["2016-07-25", "2016-07-26", "2016-08-01", "2016-08-02", "2016-08-03", "2016-08-04", "2016-08-05", "2016-08-08", "2016-08-09", "2016-08-10"];
would solve the issue.