MCPcopy Create free account
hub / github.com/apache/fory / read

Method read

javascript/packages/core/lib/gen/datetime.ts:110–113  ·  view source on GitHub ↗
(accessor: (expr: string) => string)

Source from the content-addressed store, hash-verified

108 }
109
110 read(accessor: (expr: string) => string): string {
111 const epoch = this.scope.declareByName("epoch", `new Date("1970/01/01 00:00").getTime()`);
112 return accessor(`new Date(${epoch} + (Number(${this.builder.reader.readVarInt64()}) * (24 * 60 * 60) * 1000))`);
113 }
114
115 getFixedSize(): number {
116 return 11;

Callers

nothing calls this directly

Calls 2

declareByNameMethod · 0.80
readVarInt64Method · 0.45

Tested by

no test coverage detected