MCPcopy Create free account
hub / github.com/codemix/graph / compareTo

Method compareTo

packages/graph/src/TemporalTypes.ts:476–483  ·  view source on GitHub ↗
(other: TimeValue)

Source from the content-addressed store, hash-verified

474 }
475
476 public compareTo(other: TimeValue): number {
477 // Compare by normalized UTC time
478 const thisUTC = this.#hour * 3600 + this.#minute * 60 + this.#second - this.#offsetSeconds;
479 const otherUTC = other.#hour * 3600 + other.#minute * 60 + other.#second - other.#offsetSeconds;
480
481 if (thisUTC !== otherUTC) return thisUTC - otherUTC;
482 return this.#nanosecond - other.#nanosecond;
483 }
484}
485
486/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected