Rather than the `num` meta-crate, use `num-integer` and `num-traits`
without default features to make them `#[no_std]`. `num-iter` is
just a dev-dependency now for a few test cases.
The only public change is the `impl FromPrimitive for Weekday`, but this
is still the same exact trait that `num` re-exports, so this is not a
breaking change.
- 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.
So this is a much delayed major release, but this should not really
change how you use Chrono---only the "required" breakages have been
done (e.g. anything hindering API evolution). The "big" release used to
be 0.3, but due to the dependency changes we are forced to push that to
0.4. I've took this opportunity to push all known planned breaking
changes to 0.3, so this should be quite stable for a moment.
See `CHANGELOG.md` for the full list of changes, but most importantly:
- `chrono::prelude` module has been added for proper glob imports.
- `FixedOffset` is now the official "value" type for time zone offsets.
- Serde 0.9 support has landed, and serialization format used by
rustc-serialize and Serde has been now synchronized.
- Formatting items have been slightly adjusted to be future-proof.
Fixes#126.
All CI accounts are now moved to the new organization (unfortunately
Appveyor does not automatically move the build history though).
Since it's a mess to redirect everything to chronotope.github.io,
I've taken this as an opportunity to switch to docs.rs---this seems
to be better than the manual management nowadays.
Updated other files as accordingly.
- Serde 0.8 is now supported. (#86)
- The deserialization implementation for rustc-serialize now properly
verifies the input. Also tons of tests have been added. (#42)
- Tons of documentation updates! (#77, #78, #80, #82 and my own
changes as well)
- `DateTime::timestamp_subsec_{millis,micros,nanos}` methods have
been added. (#81)
- When the system time records a leap second,
the nanosecond component was mistakenly reset to zero. (#84)
- `Local` offset misbehaves in Windows for August and later,
due to the long-standing libtime bug (dates back to mid-2015).
Workaround has been implemented. (#85)
- `%.6f` and `%.9f` used to print only three digits
when the nanosecond part is zero. (#71)
- The documentation for `%+` has been updated
to reflect the current status. (#71)
requirement for rand comes from `num`'s default features which are all unused in `chrono`
not including the default features means that that `build` no longer requires `rand` (and hence does not pass it on to others importing `chrono`)
I thought it should also remove it for `test` / `bench` also but the `serde_json` dev-dependency seems to make it included..
- Added `%.3f`, `%.6f` and `%.9f` specifier for formatting fractional seconds
up to 3, 6 or 9 decimal digits. This is a natural extension to the existing `%f`.
Note that this is (not yet) generic, no other value of precision is supported. (#45)
- Forbade unsized types from implementing `Datelike` and `Timelike`.
This does not make a big harm as any type implementing them should be already sized
to be practical, but this change still can break highly generic codes. (#46)
- Fixed a broken link in the `README.md`. (#41)
- Tons of supporting examples for the documentation have been added. More to come.
- Added padding modifiers `%_?`, `%-?` and `%0?`.
- Added new specifiers `%:z` and `%.f`.
- When `%s` specifier is used with a time zone, the time zone offset was
ignored. This has been fixed.
- Several documentation fixes including the misleading presence of
colons in the `%z` specifier. `%:z` was introduced partly due to this.
- `NaiveDateTime +/- Duration` or `NaiveTime +/- Duration` could
have gone wrong when the `Duration` to be added is negative and
has a fractional second part.
This was caused by an underflow in the conversion from `Duration`
to the parts; the lack of tests for this case allowed a bug.
A regression test has been added to avoid further bugs. (#37)
- This version is finally beta-compatible.
This introduces a slight incompatibility, namely, due to
the rewired reexport for `chrono::Duration` (which now comes
from crates.io `time` crate).
- The optional dependency on `rustc_serialize` and relevant
`Rustc{En,De}codable` implementations for supported types
has been added. You will need the `rustc-serialize` Cargo
feature to use them.
- Many `std::num` traits are removed and replaced with
the external `num` crate. For time being, thus, Chrono will
require the dependency on `num`. This is expected to be temporary
however.
- Replaced `thread::scoped` with `thread::spawn` to cope with
a rare de-stabilization event.
- `#[deprecated]` is (ironically) deprecated with user crates.
All uses of them have been replaced by doc comments.
- Feature flags are now required on the doctests.
- New lints for trivial casts. We are now not going to change
the internal implementation type for `NaiveDate`, so that's fine.
- `DateTime<Tz>` and `Date<Tz>` is now `Copy`/`Send` when
`Tz::Offset` is `Copy`/`Send`. The implementations for them were
mistakenly omitted. Fixes#25.
- `Local::from_utc_datetime` didn't set a correct offset.
The tests for `Local` were lacking. Fixes#26.
this new module encompasses John Nagle's original RFC 2822 and 3337
parsers, updated to fully compatible to the actual standard.
the contributed `parse` module has been merged into it.