conditions icon indicating copy to clipboard operation
conditions copied to clipboard

Time and Duration Support

Open HurSungYun opened this issue 4 years ago • 0 comments

I'm about to use this library as rules engine.

I have found there is a code related time.Time and time.Duration (it's int64 anyway) but it is not used.

// InspectDataType returns the data type of a given value.
func InspectDataType(v interface{}) DataType {
	switch v.(type) {
	case float64:
		return Number
	case bool:
		return Boolean
	case string:
		return String
	case time.Time:
		return Time
	case time.Duration:
		return Duration
	default:
		return Unknown
	}
}

Is there any plan to support time related types?

If you have any spec for that, it would be really great share me. I want to use time types and I have plans to implement it.

HurSungYun avatar Jan 27 '21 05:01 HurSungYun