Date and Time
Manage the complexity of dealing with the fourth dimension.
There are two key libraries:
-
time
: a smaller, simpler library. Preferrable if covers your needs, but it's quite limited in what it provides. -
chrono
: the most comprehensive and full-featured datetime library, but more complex because of it.
Unfortunately there is no clear answer as to which is best between time
and chrono
. Evaluate for yourself between these two, but both are trusted and well-maintained.
Duration and Calculation
Recipe | Crates | Categories |
---|---|---|
Measure elapsed time | ||
Perform checked date and time calculations | ||
Convert a local time to another timezone |
TODO
Parsing and Displaying
Recipe | Crates | Categories |
---|---|---|
Examine the date and time | ||
Convert date to UNIX timestamp and vice versa | ||
Display formatted date and time | ||
Parse string into DateTime struct |
Using the time
crate
Recipe | Crates | Categories |
---|---|---|
Use the time crate |