Javascript utility functions - date strings arrays