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.
( style duration.IntervalStyle, s string, itm types.IntervalTypeMetadata, )
| 3181 | // types.IntervalTypeMetadata that both specifies the units for unitless, numeric intervals |
| 3182 | // and also specifies the precision of the interval. |
| 3183 | func ParseDIntervalWithTypeMetadata( |
| 3184 | style duration.IntervalStyle, s string, itm types.IntervalTypeMetadata, |
| 3185 | ) (*DInterval, error) { |
| 3186 | d, err := ParseIntervalWithTypeMetadata(style, s, itm) |
| 3187 | if err != nil { |
| 3188 | return nil, err |
| 3189 | } |
| 3190 | return &DInterval{Duration: d}, nil |
| 3191 | } |
| 3192 | |
| 3193 | // ParseIntervalWithTypeMetadata is the same as ParseDIntervalWithTypeMetadata |
| 3194 | // but returns a duration.Duration. |
no test coverage detected
searching dependent graphs…