diff --git a/AUTHORS.txt b/AUTHORS.txt index f23d3eb..5c790cc 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -14,7 +14,9 @@ David Hewson David Ross David Tolnay David Willie +Eric Findlay Eunchong Yu +Frans Skarman Huon Wilson Jim Turner Jisoo Park diff --git a/CHANGELOG.md b/CHANGELOG.md index 1915bf5..30b7381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,28 @@ Chrono obeys the principle of [Semantic Versioning](http://semver.org/). There were/are numerous minor versions before 1.0 due to the language changes. Versions with only mechnical changes will be omitted from the following list. +## 0.3.1 (2017-05-02) + +### Added + +- `Weekday` now implements `FromStr`, `Serialize` and `Deserialize`. (#113) + + The syntax is identical to `%A`, i.e. either the shortest or the longest form of English names. + +### Changed + +- Serde 1.0 is now supported. (#142) + + This is technically a breaking change because Serde 0.9 and 1.0 are not compatible, + but this time we decided not to issue a minor version because + we have already seen Serde 0.8 and 0.9 compatibility problems even after 0.3.0 and + a new minor version turned out to be not very helpful for this kind of issues. + +### Fixed + +- Fixed a bug that the leap second can be mapped wrongly in the local time zone. + Only occurs when the local time zone is behind UTC. (#130) + ## 0.3.0 (2017-02-07) The project has moved to the [Chronotope](https://github.com/chronotope/) organization. diff --git a/Cargo.toml b/Cargo.toml index 6196612..31eb1bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chrono" -version = "0.3.0" +version = "0.3.1" authors = ["Kang Seonghoon "] description = "Date and time library for Rust" diff --git a/src/lib.rs b/src/lib.rs index d5096b4..0b66e91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ // This is a part of Chrono. // See README.md and LICENSE.txt for details. -//! # Chrono 0.3.0 +//! # Chrono 0.3.1 //! //! Date and time handling for Rust. //! It aims to be a feature-complete superset of @@ -110,19 +110,19 @@ //! or in the local time zone //! ([`Local::now()`](./offset/local/struct.Local.html#method.now)). //! -//! ~~~~ {.rust} +//! ```rust //! use chrono::prelude::*; //! //! let utc: DateTime = UTC::now(); // e.g. `2014-11-28T12:45:59.324310806Z` //! let local: DateTime = Local::now(); // e.g. `2014-11-28T21:45:59.324310806+09:00` //! # let _ = utc; let _ = local; -//! ~~~~ +//! ``` //! //! Alternatively, you can create your own date and time. //! This is a bit verbose due to Rust's lack of function and method overloading, //! but in turn we get a rich combination of initialization methods. //! -//! ~~~~ {.rust} +//! ```rust //! use chrono::prelude::*; //! use chrono::offset::LocalResult; //! @@ -148,7 +148,7 @@ //! let fixed_dt = FixedOffset::east(9 * 3600).ymd(2014, 7, 8).and_hms_milli(18, 10, 11, 12); //! assert_eq!(dt, fixed_dt); //! # let _ = local_dt; -//! ~~~~ +//! ``` //! //! Various properties are available to the date and time, and can be altered individually. //! Most of them are defined in the traits [`Datelike`](./trait.Datelike.html) and @@ -156,7 +156,7 @@ //! Addition and subtraction is also supported. //! The following illustrates most supported operations to the date and time: //! -//! ~~~~ {.rust} +//! ```rust //! # extern crate chrono; extern crate time; fn main() { //! use chrono::prelude::*; //! use time::Duration; @@ -196,7 +196,7 @@ //! assert_eq!(UTC.ymd(1970, 1, 1).and_hms(0, 0, 0) - Duration::seconds(1_000_000_000), //! UTC.ymd(1938, 4, 24).and_hms(22, 13, 20)); //! # } -//! ~~~~ +//! ``` //! //! Formatting is done via the [`format`](./datetime/struct.DateTime.html#method.format) method, //! which format is equivalent to the familiar `strftime` format. @@ -208,7 +208,7 @@ //! [`to_rfc3339`](./datetime/struct.DateTime.html#method.to_rfc3339) methods //! for well-known formats. //! -//! ~~~~ {.rust} +//! ```rust //! use chrono::prelude::*; //! //! let dt = UTC.ymd(2014, 11, 28).and_hms(12, 0, 9); @@ -220,7 +220,7 @@ //! assert_eq!(dt.to_rfc2822(), "Fri, 28 Nov 2014 12:00:09 +0000"); //! assert_eq!(dt.to_rfc3339(), "2014-11-28T12:00:09+00:00"); //! assert_eq!(format!("{:?}", dt), "2014-11-28T12:00:09Z"); -//! ~~~~ +//! ``` //! //! Parsing can be done with three methods: //! @@ -249,7 +249,7 @@ //! More detailed control over the parsing process is available via //! [`format`](./format/index.html) module. //! -//! ~~~~ {.rust} +//! ```rust //! use chrono::prelude::*; //! //! let dt = UTC.ymd(2014, 11, 28).and_hms(12, 0, 9); @@ -277,7 +277,7 @@ //! assert!(UTC.datetime_from_str("Fri Nov 28 12:00:09", "%a %b %e %T").is_err()); //! // oops, the weekday is incorrect! //! assert!(UTC.datetime_from_str("Sat Nov 28 12:00:09 2014", "%a %b %e %T %Y").is_err()); -//! ~~~~ +//! ``` //! //! ### Individual date //! @@ -285,7 +285,7 @@ //! It also has time zones attached, and have to be constructed via time zones. //! Most operations available to `DateTime` are also available to `Date` whenever appropriate. //! -//! ~~~~ {.rust} +//! ```rust //! use chrono::prelude::*; //! use chrono::offset::LocalResult; //! @@ -297,7 +297,7 @@ //! assert_eq!(UTC.ymd_opt(2014, 11, 31), LocalResult::None); //! assert_eq!(UTC.ymd(2014, 11, 28).and_hms_milli(7, 8, 9, 10).format("%H%M%S").to_string(), //! "070809"); -//! ~~~~ +//! ``` //! //! There is no timezone-aware `Time` due to the lack of usefulness and also the complexity. //!