Fixed memory leak calling getFormatedDate()