Improve getting dates