Replace util functions with moment