Refactored existing code to new method for reusable parsing of date and time formulas.