13 releases
0.4.4 | Oct 30, 2024 |
---|---|
0.4.3 | Oct 24, 2024 |
0.4.2 | Mar 3, 2024 |
0.4.1 | Jan 13, 2024 |
0.1.0 | Oct 16, 2023 |
#259 in Date and time
133 downloads per month
Used in 16 crates
(10 directly)
555KB
12K
SLoC
IROX-TIME
A date & time library that aims for ease of use using static compile-time types based on the Proleptic Gregorian Calendar.
Goals:
- Provide type-safe, correct, easy conversions between
Epoch
s - Provide type-safe, correct, easy conversions between the Unix Epoch and the associated Gregorian Date and Time
Non-goals:
- Handle strange edge cases like:
- Handle Time Zones and Daylight Savings Time
Eventually:
- Leap Seconds and UTC Proper
Module Structure
time
- 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.format
- Date & Time Formatters & Parsersgregorian
- ContainsDate
andMonth
, that describe a gregorian calendar date.
Features
std
- adds 'std' support:UnixTimestamp::now() -> UnixTimestamp
UnixTimestamp::elapsed() -> Duration
UTCDateTime::now() ->UTCDateTime
- impls of
std::error::Error
on errors
Dependencies
~315–740KB
~17K SLoC