reduced more code transforming a 'switch' block in simpler conditionals, added 'data-regexp' attribute for the 'week' control type