refactor to support both extended and basic ISO8601 formats
refactor to support both extended and basic ISO8601 formats