added custom dates and breaks to javascript version