Split an EDI date-range string¶
Split a delimited EDI date-range token into start and end DateTimes, triggered when caller parses a yyyymmdd-yyyymmdd token.
| Field | Value |
|---|---|
| Operation ID | OP-011 |
| Trigger | Caller parses a yyyymmdd-yyyymmdd token |
| Inputs | dateString |
| Outputs | out startDate, out endDate |
| Primary components | DateMaker.ExtractDateRange(string dateString, out DateTime startDate, out DateTime endDate) |
| Entry point | Common/SAIF.Common/Classes/DateMaker.cs |
Steps¶
- Split the input on the
DateSeperatorconstant ('-'). (BR-030) - Convert element 0 to
startDateviaMakeDateTime(OP-010). (BR-028, BR-029) - Convert element 1 to
endDateviaMakeDateTime(OP-010). (BR-028, BR-029)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["Caller parses a<br>yyyymmdd-yyyymmdd token"]) --> S1["Split input on<br>DateSeperator constant ('-')"]
S1 --> S2["Convert element 0 to<br>startDate via MakeDateTime"]
S2 --> D1{"Second element present?"}
D1 -->|No| X1(["IndexOutOfRangeException"])
D1 -->|Yes| S3["Convert element 1 to<br>endDate via MakeDateTime"]
S3 --> End(["startDate and endDate<br>returned"])
Failure and edge-case behavior¶
- A single-date input with no delimiter raises
IndexOutOfRangeExceptionat step 3.*
Related documentation¶
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Common/SAIF.Common/Classes/DateMaker.cs