Extracted methods into DateTimeUtil class.