Update DateTask.js

upgrade the code