Date Time Ops (#1110)

* Added datetime operators

* Added date subtract support
This commit is contained in:
Mike Farah
2022-02-14 15:37:43 +11:00
committed by GitHub
parent 4b2b47af48
commit b35893d783
15 changed files with 704 additions and 17 deletions
+4
View File
@@ -10,6 +10,7 @@ import (
"sort"
"strings"
"testing"
"time"
"github.com/mikefarah/yq/v4/test"
"gopkg.in/op/go-logging.v1"
@@ -31,6 +32,9 @@ type expressionScenario struct {
func TestMain(m *testing.M) {
logging.SetLevel(logging.ERROR, "")
Now = func() time.Time {
return time.Date(2021, time.May, 19, 1, 2, 3, 4, time.UTC)
}
code := m.Run()
os.Exit(code)
}