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

Function GetIntervalDurationFromTimeComponents

server/functions/age.go:116–122  ·  view source on GitHub ↗
(years, months, days, hours, minutes, seconds, nanos int64)

Source from the content-addressed store, hash-verified

114}
115
116func GetIntervalDurationFromTimeComponents(years, months, days, hours, minutes, seconds, nanos int64) duration.Duration {
117 durNanos := nanos + seconds*NanosPerSec + minutes*NanosPerSec*duration.SecsPerMinute + hours*NanosPerSec*duration.SecsPerHour
118 durDays := days
119 durMonths := months + years*duration.MonthsPerYear
120
121 return duration.MakeDuration(durNanos, durDays, durMonths)
122}

Callers 2

timeImplicitFunction · 0.92
diffTimesFunction · 0.85

Calls 1

MakeDurationFunction · 0.92

Tested by

no test coverage detected