Skip to content

lytics/datemath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

datemath

Date math evaluator. godoc

Based on ElasticSearch's date math:

Syntax

[ operator ] [ number ] [ unit ]

# examples

now-3d   #  now minus 3 days
now+3h   #  now plus 3 hours
+3M      #  now + 3 months, note now is optional
+1y      #  now + 1 year

operator is either + or -. number must be an integer. The units supported are:

  • y (year)
  • M (month)
  • w (week)
  • d (date)
  • h (hour)
  • m (minute)
  • s (second)

About

Simple library for evaluating ElasticSearch style date expressions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages