Move common used method to up
Support time in String