datetime functions moved to new Datetime class