optimize common/date.js

optimize common/date.js