bugfix and extend in pastry.date.js