replace a switch by an array to get name of weekday

Tiny change while trying to wrap my head around the examples. dc is awesome.