Change function for date to satisfy PHO 5.3