#date-time #time #calendar #date

datetimeutils

A zero-dependency crate with some date/time/calendar utilities

4 releases

0.1.3 Feb 10, 2020
0.1.2 Feb 3, 2020
0.1.1 Feb 2, 2020
0.1.0 Feb 2, 2020

#412 in Date and time

Download history 8/week @ 2024-04-08 15/week @ 2024-04-15 8/week @ 2024-04-22 25/week @ 2024-04-29 6/week @ 2024-05-06 6/week @ 2024-05-13 52/week @ 2024-05-20 9/week @ 2024-05-27 9/week @ 2024-06-03 8/week @ 2024-06-10 8/week @ 2024-06-17 20/week @ 2024-06-24 13/week @ 2024-07-01 51/week @ 2024-07-15 22/week @ 2024-07-22

88 downloads per month

0BSD license

13KB
255 lines

datetimeutils

Build Status Crate

A handful of utility functions for dealing with std::time::SystemTime in somewhat-useful ways. If you need handling for timezones, look elsewhere. This crate only deals with simple stuff. The main attraction is that it has zero external dependencies, so if it does what you want, it's lighter-weight than using chrono or time.

API

There's a bunch of public functions in the crate to do basic datetime stuff such as find the number of days in a particular year or index months. Also there's a struct PostEpochTime which effectively wraps a std::time::SystemTime but can provide human-readable date/time values from it. See full rustdoc at https://docs.rs/datetimeutils.

Examples

See files in the examples/ folder for quick examples.

No runtime deps