Refactored createWeekArray function into createDays and createWeek