Update date.js

Minor corrections suggested by JSHint.