Added custom function in date class to format display date