Debian Codegraph @

/

debian golang-github-timberio-go-datemath 0.1.0+git20200323.74ddef6-3debian golang-github-timberio-go-datemath-dev gomod github.com/timberio/go-datemath debiangoinimakefilemarkdownshellyaml 18 files · 186 symbols
View dependency graph

Depends on

README (full)

go-datemath

GoDoc Circle CI Go Report Card coverage

This library provides support for parsing datemath expressions compatibly with Elasticsearch datemath expressions. These are useful for allowing users to specify, and for encoding, relative dates. Examples:

  • now+15m: 15 minutes from now
  • now-1w+1d: one day after on week ago
  • 2015-05-05T00:00:00||+1M: one month after 2019-05-05

These expressions will seem familiar if you have used Grafana or Kibana.

Example usage:

expr, _ := datemath.Parse("now-15m")
fmt.Println(t.Time(datemath.WithNow(now)))

See package documentation for usage and more examples.

Development / Contributing

See CONTRIBUTING.md.

dir .circleci/
dir debian/
file .gitignore
file CONTRIBUTING.md
file LICENSE
file README.md
file datemath.go
file datemath.l
file datemath.l.go
file datemath.y
file datemath.y.go
file datemath_test.go
file go.mod
file go.sum