datetime functions were put into separated file