Clean up Duration intro doc

• Make what Duration is the first thing mentioned instead of project history.
• Add "magnitude" to the description to disambiguate it from Interval (in the Joda sense).
• Brush up some awkward language.
• Add a doc link and illustrate the module namespace.
This commit is contained in:
John Heitmann 2016-06-13 21:03:52 -07:00 committed by GitHub
parent 8efc85ce9f
commit dce4ddf592
1 changed files with 5 additions and 4 deletions

View File

@ -46,10 +46,11 @@ extern crate chrono;
### Duration
Chrono used to have a `Duration` type, which represents the time span.
This is a simple reexport of
[`time::Duration`](http://doc.rust-lang.org/time/time/struct.Duration.html) type
provided by crates.io `time` crate (which originally comes from Chrono).
[`chrono::Duration`](https://lifthrasiir.github.io/rust-chrono/chrono/struct.Duration.html)
represents the magnitude of a time span. `Duration` used to be provided by Chrono.
It has been moved to the `time` crate as the
[`time::Duration`](http://doc.rust-lang.org/time/time/struct.Duration.html) type, but is
still re-exported from Chrono.
### Date and Time