Improving Clear method with getDateFormat