#date-time #date #iso-8601 #irox #timezone #conversion #time

no-std irox-time

Date and Time types to manage the inherent complexity of dealing with the fourth dimension

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

Download history 37/week @ 2024-08-17 40/week @ 2024-08-24 49/week @ 2024-08-31 31/week @ 2024-09-07 44/week @ 2024-09-14 61/week @ 2024-09-21 38/week @ 2024-09-28 4/week @ 2024-10-05 23/week @ 2024-10-12 145/week @ 2024-10-19 190/week @ 2024-10-26 44/week @ 2024-11-02 12/week @ 2024-11-09 20/week @ 2024-11-16 34/week @ 2024-11-23 62/week @ 2024-11-30

133 downloads per month
Used in 16 crates (10 directly)

MIT/Apache

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 Epochs
  • Provide type-safe, correct, easy conversions between the Unix Epoch and the associated Gregorian Date and Time

Non-goals:

Eventually:

  • Leap Seconds and UTC Proper

Module Structure

  • time - Contains the base Time struct, describing a standard Hours/minutes/seconds framework.
  • datetime - Contains UTCDateTime structs, describing a Date with a Time
  • epoch - Contains Epoch, UnixEpoch, GPSEpoch, and others, providing the datum anchor for timestamps UnixTimestamp, GPSTimestamp, etc.
  • format - Date & Time Formatters & Parsers
    • iso8601 - ISO8601 Date Formats
    • rfc3339 - RFC3339 Date Formats, a slight variation on ISO8601
  • gregorian - Contains Date and Month, 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