Skip to content

Commit

Permalink
Fix relative date expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveen Premaratne committed May 11, 2020
1 parent 00a0e5d commit 9d69c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

var (
DateFormat, _ = regexp.Compile(`[0-9]{4}-[0-9]{2}-[0-9]{2}`)
RelativeDateFormat = regexp.MustCompile(`(?P<Operator>[\-|\+])(?P<Days>[0-9]+)`)
RelativeDateFormat = regexp.MustCompile(`^(?P<Operator>[\-|\+])(?P<Days>[0-9]+)`)
YmdFormat = "2006-01-02"
HmsFormat = "15:04:05"
)
Expand Down

0 comments on commit 9d69c71

Please sign in to comment.