MCPcopy Index your code
hub / github.com/larksuite/cli / isRelativeTime

Function isRelativeTime

shortcuts/task/task_util.go:21–23  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

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

Callers 2

parseTaskTimeFunction · 0.85
parseTimeFlagSecFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected