MCPcopy
hub / github.com/pocketbase/pocketbase / Compare

Method Compare

tools/types/datetime.go:74–76  ·  view source on GitHub ↗

Compare compares the current DateTime instance with u. If the current instance is before u, it returns -1. If the current instance is after u, it returns +1. If they're the same, it returns 0.

(u DateTime)

Source from the content-addressed store, hash-verified

72// If the current instance is after u, it returns +1.
73// If they're the same, it returns 0.
74func (d DateTime) Compare(u DateTime) int {
75 return d.Time().Compare(u.Time())
76}
77
78// Equal reports whether the current DateTime and u represent the same time instant.
79// Two DateTime can be equal even if they are in different locations.

Callers 3

TestDateTimeCompareFunction · 0.80
ImportCollectionsMethod · 0.80
cronsListFunction · 0.80

Calls 1

TimeMethod · 0.95

Tested by 1

TestDateTimeCompareFunction · 0.64