gitlab.com/evatix-go/core@v1.3.55/corecmp/TimePtr.go (about)

     1  package corecmp
     2  
     3  import (
     4  	"time"
     5  
     6  	"gitlab.com/evatix-go/core/corecomparator"
     7  )
     8  
     9  func TimePtr(left, right *time.Time) corecomparator.Compare {
    10  	if left == nil && right == nil {
    11  		return corecomparator.Equal
    12  	}
    13  
    14  	if left == nil || right == nil {
    15  		return corecomparator.NotEqual
    16  	}
    17  
    18  	return Time(*left, *right)
    19  }