update method name to dateEncoder