fix date format function removing angular dependancy
Fix the date formatting