#date-time #date #iso-8601 #irox #time

no-std irox-time

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

11 unstable releases (3 breaking)

0.4.2 Mar 3, 2024
0.4.1 Jan 13, 2024
0.3.5 Dec 6, 2023
0.3.4 Nov 29, 2023
0.1.0 Oct 16, 2023

#109 in Date and time

Download history 17/week @ 2023-12-18 20/week @ 2023-12-25 8/week @ 2024-01-01 42/week @ 2024-01-08 19/week @ 2024-01-15 7/week @ 2024-02-05 9/week @ 2024-02-12 21/week @ 2024-02-19 72/week @ 2024-02-26 177/week @ 2024-03-04 29/week @ 2024-03-11 22/week @ 2024-03-18 33/week @ 2024-03-25 227/week @ 2024-04-01

363 downloads per month
Used in 12 crates (9 directly)

MIT/Apache

410KB
9K 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–750KB
~18K SLoC