Skip to content

Commit

Permalink
updated dep
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed Sep 20, 2024
1 parent cbf092d commit 74d69bd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.77.0
0.77.1
19 changes: 19 additions & 0 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,22 @@ func predefinedRegistry() data.Map {
return remainingToday
})

//return fraction of elapsed today in supplied key timezone, i.e ${remainingToday.Poland}
result.Put("remainingToday", func(key string) interface{} {
remainingToday, err := toolbox.RemainingToday(key)
if err != nil {
return nil
}
return remainingToday
})

result.Put("packIntWithDate", func(key string) interface{} {
intValue := toolbox.AsInt(key)
now := time.Now()
dateKey := now.Year()*10000 + int(now.Month())*100 + now.Day()
return dateKey<<32 | intValue
})

//return formatted time with time.RFC3339 yyyy-MM-ddThh:mm:ss.SSS Z i.e ${tzTime.4daysAgoInUTC}

result.Put("tzTime", func(key string) interface{} {
Expand All @@ -451,6 +467,9 @@ func predefinedRegistry() data.Map {
return timeAt.Format(time.RFC3339)
})

// dateKey := r.At.Year()*10000 + int(r.At.Month())*100 + r.At.Day()
// r.ID = (dateKey << 32) | r.OrderID

result.Put("env", func(key string) interface{} {
return os.Getenv(key)
})
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ require (
github.com/viant/dsc v0.19.0
github.com/viant/dsunit v0.11.1-0.20240315154953-016b93c322c2
github.com/viant/scy v0.9.1
github.com/viant/toolbox v0.37.1-0.20240801181604-f2a6c58315c9
github.com/viant/toolbox v0.37.1-0.20240920190350-4edcb037fba9
github.com/yuin/gopher-lua v1.1.1 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,8 @@ github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMI
github.com/viant/toolbox v0.34.5/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/viant/toolbox v0.37.1-0.20240801181604-f2a6c58315c9 h1:9AXCJUq3fQ6zhM+6YFANRcLo8KiNqF8xbFT+n3avvMA=
github.com/viant/toolbox v0.37.1-0.20240801181604-f2a6c58315c9/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/viant/toolbox v0.37.1-0.20240920190350-4edcb037fba9 h1:ZNZOh2Regsr8YO5ypilU47U7DIkoUKgIx6xofChgjRQ=
github.com/viant/toolbox v0.37.1-0.20240920190350-4edcb037fba9/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/viant/velty v0.2.1-0.20230927172116-ba56497b5c85 h1:zKk+6hqUipkJXCPCHyFXzGtil1sfh80r6UZmloBNEDo=
github.com/viant/velty v0.2.1-0.20230927172116-ba56497b5c85/go.mod h1:Q/UXviI2Nli8WROEpYd/BELMCSvnulQeyNrbPmMiS/Y=
github.com/viant/x v0.3.0 h1:/3A0z/uySGxMo6ixH90VAcdjI00w5e3REC1zg5hzhJA=
Expand Down

0 comments on commit 74d69bd

Please sign in to comment.