MCPcopy Create free account
hub / github.com/denoland/std / encodeDate

Function encodeDate

cbor/_common_encode.ts:228–231  ·  view source on GitHub ↗
(input: Date, output: Uint8Array, offset: number)

Source from the content-addressed store, hash-verified

226}
227
228function encodeDate(input: Date, output: Uint8Array, offset: number): number {
229 output[offset++] = 0b110_00001;
230 return encodeNumber(input.getTime() / 1000, output, offset);
231}
232
233function encodeTag(
234 input: CborTag<CborType>,

Callers 1

encodeFunction · 0.85

Calls 1

encodeNumberFunction · 0.70

Tested by

no test coverage detected