Expand description
§Module Structure
crate
- Contains the baseTime
struct, describing a standardHours/minutes/seconds
framework.datetime
- ContainsUTCDateTime
structs, describing aDate
with aTime
epoch
- ContainsEpoch
,UnixEpoch
,GPSEpoch
, and others, providing the datum anchor for timestampsUnixTimestamp
,GPSTimestamp
, etc.gregorian
- ContainsDate
andMonth
, that describe a gregorian calendar date.julian
- ContainsJulianDate
and it’s associated epochs.crate::format
- ContainsFormat
andFormatParser
to tranlate dates to and from strings.crate::format::iso8601
- ISO8601 Implementations ofDateFormat
andDateFormatParser
The top level module Contains the various representations of Time
A Time
is a specific time offset into a Day. Intended for use where Hour:Minute:Seconds are
needed.
The following are variants of epoch::Timestamp
, with specific methods and sizes to
to represent the Duration against an Epoch
. These follow the same binary format as the NTP
Timestamp format, if used with the NTP Epoch
.
Modules§
- Date Formatters
- Contains
Date
and associated elements to represent a Proleptic Gregorian Date. - Contains
JulianDate
and others - ways of measuring a discrete amount of days from a specific JulianEpoch
Structs§
- An error type to indicate that the checked value is greater than or equal to the valid reference value
- A
Range
implementation to verify a value is less than the reference value - Represents a time of the day, an offset into the day from midnight.
- 32 Bit Fixed Precision Time Format, storing 16 bits of Seconds, and 16 bits of Fractional Seconds. This is the equivalent of Q16.16, and is semantically equivalent to the NTP Short Format if using the
epoch::NTP_EPOCH
. - 64 Bit Fixed Precision Time Format, storing 32 bits of Seconds, and 32 bits of Fractional Seconds. This is the equivalent of Q32.32, and is semantically equivalent to the NTP Timestamp Format if using the
epoch::NTP_EPOCH
. - 128 Bit Fixed Precision Time Format, storing 64 bits of Seconds, and 64 bits of Fractional Seconds. This is the equivalent of Q64.64, and is semantically equivalent to the NTP Datestamp Format if using the
epoch::NTP_EPOCH
.
Enums§
- Represents a specific duration unit - SI or otherwise.
Constants§
- 24 Hours in a Day
- 1440 Minutes in a Day
- 60 Minutes in an Hour
- Nanoseconds in a Day
- Nanoseconds in a Microsecond
- Nanoseconds in a Millisecond
- Nanoseconds in a Second
- Generally 86400, but occasionally 86401 for leap seconds.
- 3600 Seconds in an Hour
- 60 Seconds in a Minute
Traits§
- A trait to check if a particular value is within range