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

Method WriteDate

csharp/src/Fory/TimeSerializers.cs:24–27  ·  view source on GitHub ↗
(WriteContext context, in DateOnly value)

Source from the content-addressed store, hash-verified

22 private static readonly DateOnly Epoch = new(1970, 1, 1);
23
24 public static void WriteDate(WriteContext context, in DateOnly value)
25 {
26 context.Writer.WriteVarInt64(value.DayNumber - Epoch.DayNumber);
27 }
28
29 public static DateOnly ReadDate(ReadContext context)
30 {

Callers 3

WriteDataMethod · 0.80
WriteDataMethod · 0.80
TryWriteKnownPayloadMethod · 0.80

Calls 1

WriteVarInt64Method · 0.80

Tested by

no test coverage detected