Rewritten alot of code. Looks completely different but does the same thing.
Done some cleanup on how averege is calculated and ÅÄÖ is now sorted correctly. Passes all tests.
Exchanged forEach with map because of the laboration instructions.
Fixed error in calculation of dates.
Rewritten and made a function.
Removed the daysToDate as its unnecessary.