updated date function to use new EE Localize class