(s string)
| 19 | var relativeTimeRe = regexp.MustCompile(`^([+-])(\d+)([dwmh])$`) |
| 20 | |
| 21 | func isRelativeTime(s string) bool { |
| 22 | return relativeTimeRe.MatchString(s) |
| 23 | } |
| 24 | |
| 25 | func parseRelativeTime(s string) (time.Time, error) { |
| 26 | matches := relativeTimeRe.FindStringSubmatch(s) |
no outgoing calls
no test coverage detected