toTimeDiff - multiple declarations

Function toTimeDiff

Function to extract a time difference from a binary encoded row.

TimeDiff toTimeDiff (
  in const(ubyte[]) a
) pure @safe;

Time/date structures are packed by the server into a byte sub-packet with a leading length byte, and a minimal number of bytes to embody the data.

Parameters

NameDescription
a slice of a protocol packet beginning at the length byte for a chunk of time data

Returns

A populated or default initialized TimeDiff struct.

Function toTimeDiff

Function to extract a time difference from a text encoded column value.

TimeDiff toTimeDiff (
  string s
) @safe;

Text representations of a time difference are like -750:12:02 - 750 hours 12 minutes and two seconds ago.

Parameters

NameDescription
s A string representation of the time difference.

Returns

A populated or default initialized TimeDiff struct.