Put date functions in separate file agenda.js