func (ival Interval) Years() int32 {
	years := int32(ival.yrs & (yrSignBit - 1))
	if ival.yrs&yrSignBit != 0 {
		years *= -1
	}
	return years
}
Years returns the number of years in the interval.
package pqinterval
import (
	"database/sql/driver"
	"errors"
	"fmt"
	"strings"
	"time"
)
type Interval struct {
	yrs uint32
	hrs int32
	us uint32
}
func New(years, days, hours, minutes, seconds, microseconds int) Interval {
	if years > maxYear || years < minYear || int64(hours) > maxHour || hours < minHour {
		panic("interval outside range")
	}
	microsecs := int64(microseconds) + int64(seconds)*usPerSec + int64(minutes)*usPerMin
	hrs := int64(hours) + int64(days)*24 + microsecs/usPerHr
	yrs := int64(years)
	microsecs %= usPerHr
	if yrs < 0 {
		yrs = (-yrs) | yrSignBit
	}
	if microsecs < 0 {
		yrs |= usSignBit
		microsecs *= -1
	}
	return Interval{
		yrs: uint32(yrs),
		hrs: int32(hrs),
		us:  uint32(microsecs),
	}
}