solved bug with the inicialization of the date