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

Method Sub

postgres/parser/duration/duration.go:496–498  ·  view source on GitHub ↗

Sub returns a Duration representing a time length of d-x.

(x Duration)

Source from the content-addressed store, hash-verified

494
495// Sub returns a Duration representing a time length of d-x.
496func (d Duration) Sub(x Duration) Duration {
497 return MakeDuration(d.nanos-x.nanos, d.Days-x.Days, d.Months-x.Months)
498}
499
500// Mul returns a Duration representing a time length of d*x.
501func (d Duration) Mul(x int64) Duration {

Callers 2

sqlStdToDurationFunction · 0.95
DiffMicrosFunction · 0.45

Calls 1

MakeDurationFunction · 0.85

Tested by

no test coverage detected