#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

17 releases

0.4.8 Feb 12, 2025
0.4.6 Dec 15, 2024
0.4.4 Oct 30, 2024
0.4.2 Mar 3, 2024
0.3.4 Nov 29, 2023

#223 in Date and time

Download history 173/week @ 2024-10-30 23/week @ 2024-11-06 13/week @ 2024-11-13 35/week @ 2024-11-20 65/week @ 2024-11-27 72/week @ 2024-12-04 450/week @ 2024-12-11 77/week @ 2024-12-18 17/week @ 2024-12-25 36/week @ 2025-01-01 42/week @ 2025-01-08 23/week @ 2025-01-15 198/week @ 2025-01-22 35/week @ 2025-01-29 126/week @ 2025-02-05 201/week @ 2025-02-12

566 downloads per month
Used in 18 crates (11 directly)

MIT/Apache

690KB
16K 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

~295–710KB
~17K SLoC