ParseDIntervalWithTypeMetadata is like ParseDInterval, but it also takes a types.IntervalTypeMetadata that both specifies the units for unitless, numeric intervals and also specifies the precision of the interval.
(s string, itm types.IntervalTypeMetadata)
| 2543 | // types.IntervalTypeMetadata that both specifies the units for unitless, numeric intervals |
| 2544 | // and also specifies the precision of the interval. |
| 2545 | func ParseDIntervalWithTypeMetadata(s string, itm types.IntervalTypeMetadata) (*DInterval, error) { |
| 2546 | d, err := parseDInterval(s, itm) |
| 2547 | if err != nil { |
| 2548 | return nil, err |
| 2549 | } |
| 2550 | truncateDInterval(d, itm) |
| 2551 | return d, nil |
| 2552 | } |
| 2553 | |
| 2554 | func parseDInterval(s string, itm types.IntervalTypeMetadata) (*DInterval, error) { |
| 2555 | // At this time the only supported interval formats are: |
no test coverage detected
searching dependent graphs…