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

Method epochMillis

packages/graph/src/TemporalTypes.ts:916–923  ·  view source on GitHub ↗

* Get the epoch milliseconds (milliseconds since 1970-01-01T00:00:00Z).

()

Source from the content-addressed store, hash-verified

914 * Get the epoch milliseconds (milliseconds since 1970-01-01T00:00:00Z).
915 */
916 public get epochMillis(): number {
917 const date = new Date(
918 Date.UTC(this.#year, this.#month - 1, this.#day, this.#hour, this.#minute, this.#second),
919 );
920 // Adjust for timezone offset
921 const ms = date.getTime() - this.#offsetSeconds * 1000;
922 return ms + Math.floor(this.#nanosecond / 1_000_000);
923 }
924
925 public get(property: string): unknown {
926 switch (property) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected