Better way of doing date getting