The problem is that there is one day object, named ScoopDay, and you are adding that one object to the array 3000 times. So the array ends up with 3000 references to that one single object, which contains the last values you assigned to it.

You can fix this by moving the line

var ScoopDay = day()

inside the loop. That way you will create 3000 different day objects, each with different contents.

A Swift style tip: capitalize the first letter of class names, and lowercase the first letter of variable names, so:

class Day

and

var scoopDay = Day()

Email codedump link for Trying to get data from a number of consecutive dates