Class HighPrecisionDateTimeParsers
Helper class for FIX date and time formats.
Provides ability for parsing different types of date/time values from the buffer of bytes. It is also possible to work with high precision values: micro- and nanoseconds.
Inheritance
Inherited Members
Namespace: FixAntenna.Fix.Message
Assembly: FixAntenna.Message.dll
Syntax
public class HighPrecisionDateTimeParsers
Methods
parseTimeOnly(Byte[])
Parses the TimeOnly
value from buffer
.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]
Declaration
public static DateTimeOffset parseTimeOnly(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTimeOffset | the local time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTimeOnly(Byte[], Int32, Int32)
Parses the TimeOnly
value from buffer
.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]
Declaration
public static DateTime parseTimeOnly(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.DateTime | the local time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTimestamp(Byte[])
Parses the Timestamp
value from buffer
to dateTime
.
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].
Declaration
public static DateTime ParseTimestamp(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime | the local date time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTimestamp(Byte[], Int32, Int32)
Parses the Timestamp
value from buffer
to dateTime
.
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].
Declaration
public static DateTime ParseTimestamp(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.DateTime | the local date time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTZTimeOnly(Byte[])
Parses the TZTimeOnly
value from buffer
.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]
Declaration
public static DateTimeOffset parseTZTimeOnly(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTimeOffset | the offset time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTZTimeOnly(Byte[], Int32, Int32)
Parses the TZTimeOnly
value from buffer
.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]
Declaration
public static DateTimeOffset parseTZTimeOnly(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.DateTimeOffset | the offset time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTzTimestamp(Byte[])
Parses the TZTimestamp
value from buffer
.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]
Declaration
public static DateTimeOffset ParseTzTimestamp(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTimeOffset | the offset time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTzTimestamp(Byte[], Int32, Int32)
Parses the TZTimestamp
value from buffer
.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]
Declaration
public static DateTimeOffset ParseTzTimestamp(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.DateTimeOffset | the offset time structured from the given buffer
In contrast to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |