#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

15 releases

0.4.6 Dec 15, 2024
0.4.4 Oct 30, 2024
0.4.2 Mar 3, 2024
0.3.5 Dec 6, 2023
0.3.4 Nov 29, 2023

#233 in Date and time

Download history 46/week @ 2024-09-11 52/week @ 2024-09-18 41/week @ 2024-09-25 23/week @ 2024-10-02 16/week @ 2024-10-09 20/week @ 2024-10-16 177/week @ 2024-10-23 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

618 downloads per month
Used in 18 crates (10 directly)

MIT/Apache

585KB
13K 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

~320–750KB
~18K SLoC