making this pass range interface.

This commit is contained in:
Will Charczuk 2016-07-21 22:22:22 -07:00
parent c4066176cf
commit dea8e71d6f

View File

@ -15,6 +15,11 @@ type NYSEMarketHoursRange struct {
Domain int Domain int
} }
// IsZero returns if the range is setup or not.
func (mhr NYSEMarketHoursRange) IsZero() bool {
return mhr.Min.IsZero() && mhr.Max.IsZero()
}
// GetMin returns the min value. // GetMin returns the min value.
func (mhr NYSEMarketHoursRange) GetMin() float64 { func (mhr NYSEMarketHoursRange) GetMin() float64 {
return TimeToFloat64(mhr.Min) return TimeToFloat64(mhr.Min)