0.3.1: Minor maintenance release, Serde 1.0 support.
- Serde 1.0 is now supported. (#142) Technically this is a breaking change, but the minor version was not effective in avoiding dependency breakages anyway (because Cargo will silently compile two versions of crates). Provided that this is likely the last breakage from Serde, we tolerate this more-than-last-minute change in this version. - `Weekday` now implements `FromStr`, `Serialize` and `Deserialize`. (#113) - Fixed a bug that the leap second can be mapped wrongly in the local tz with some conditions. (#130) - Some changes to the tests to avoid previously known issues. Note that the actually published version is very slightly different from the repository because no published version of bincode supports Serde 1.0 right now.
This commit is contained in:
parent
fcb74481ee
commit
dcf193323b
|
@ -14,7 +14,9 @@ David Hewson <dev@daveid.co.uk>
|
|||
David Ross <daboross@daboross.net>
|
||||
David Tolnay <dtolnay@gmail.com>
|
||||
David Willie <david.willie.1@gmail.com>
|
||||
Eric Findlay <e.findlay@protonmail.ch>
|
||||
Eunchong Yu <kroisse@gmail.com>
|
||||
Frans Skarman <frans.skarman@gmail.com>
|
||||
Huon Wilson <dbau.pp+github@gmail.com>
|
||||
Jim Turner <jturner314@gmail.com>
|
||||
Jisoo Park <xxxyel@gmail.com>
|
||||
|
|
22
CHANGELOG.md
22
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.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "chrono"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
authors = ["Kang Seonghoon <public+rust@mearie.org>"]
|
||||
|
||||
description = "Date and time library for Rust"
|
||||
|
|
26
src/lib.rs
26
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> = UTC::now(); // e.g. `2014-11-28T12:45:59.324310806Z`
|
||||
//! let local: DateTime<Local> = 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.
|
||||
//!
|
||||
|
|
Loading…
Reference in New Issue