datesArray init rewrite