fixing the date printing & comparison