moved date fun to app.js