optimize common/date.js