Skip to content

Commit

Permalink
0.3.1: Minor maintenance release, Serde 1.0 support.
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
lifthrasiir committed May 1, 2017
1 parent fcb7448 commit dcf1933
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 14 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ David Hewson <[email protected]>
David Ross <[email protected]>
David Tolnay <[email protected]>
David Willie <[email protected]>
Eric Findlay <[email protected]>
Eunchong Yu <[email protected]>
Frans Skarman <[email protected]>
Huon Wilson <[email protected]>
Jim Turner <[email protected]>
Jisoo Park <[email protected]>
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chrono"
version = "0.3.0"
version = "0.3.1"
authors = ["Kang Seonghoon <[email protected]>"]

description = "Date and time library for Rust"
Expand Down
26 changes: 13 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
//!
Expand All @@ -148,15 +148,15 @@
//! 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
//! [`Timelike`](./trait.Timelike.html) which you should `use` before.
//! 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;
Expand Down Expand Up @@ -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.
Expand All @@ -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);
Expand All @@ -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:
//!
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -277,15 +277,15 @@
//! 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
//!
//! Chrono also provides an individual date type ([**`Date`**](./date/struct.Date.html)).
//! 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;
//!
Expand All @@ -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.
//!
Expand Down

0 comments on commit dcf1933

Please sign in to comment.