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

no-std irox-time

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

13 releases

new 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

#218 in Date and time

Download history 26/week @ 2024-07-08 62/week @ 2024-07-15 32/week @ 2024-07-22 51/week @ 2024-07-29 56/week @ 2024-08-05 38/week @ 2024-08-12 39/week @ 2024-08-19 56/week @ 2024-08-26 23/week @ 2024-09-02 40/week @ 2024-09-09 44/week @ 2024-09-16 63/week @ 2024-09-23 26/week @ 2024-09-30 2/week @ 2024-10-07 33/week @ 2024-10-14 166/week @ 2024-10-21

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

MIT/Apache

550KB
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

~325–760KB
~18K SLoC