make date helper use named attributes