MCPcopy Create free account
hub / github.com/dolthub/doltgresql / MakeNormalizedDuration

Function MakeNormalizedDuration

postgres/parser/duration/duration.go:123–129  ·  view source on GitHub ↗

MakeNormalizedDuration returns a normalized Duration.

(nanos, days, months int64)

Source from the content-addressed store, hash-verified

121
122// MakeNormalizedDuration returns a normalized Duration.
123func MakeNormalizedDuration(nanos, days, months int64) Duration {
124 return Duration{
125 Months: months,
126 Days: days,
127 nanos: rounded(nanos),
128 }.normalize()
129}
130
131// DecodeDuration returns a Duration without rounding nanos.
132func DecodeDuration(months, days, nanos int64) Duration {

Callers

nothing calls this directly

Calls 2

roundedFunction · 0.85
normalizeMethod · 0.80

Tested by

no test coverage detected