#date-time #time

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

#411 in Date and time

Download history 12/week @ 2024-07-20 18/week @ 2024-07-27 9/week @ 2024-08-03 19/week @ 2024-08-10 13/week @ 2024-08-17 17/week @ 2024-08-24 2/week @ 2024-08-31 4/week @ 2024-09-07 8/week @ 2024-09-14 23/week @ 2024-09-21 13/week @ 2024-09-28 9/week @ 2024-10-05 21/week @ 2024-10-12 23/week @ 2024-10-19 24/week @ 2024-10-26 48/week @ 2024-11-02

117 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