changed mapDate function to automatise mapping integers onto dates