- `%.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)
- 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.
so that we can safely implement `FromStr` traits for those types.
also updates READMEs and rewires `%+` specifier of `StrftimeItems`
to a new RFC 3339 formatting item.
Basically, this should close#12 when officially released.
- Formatting syntax is now refactored out of the rendering logic.
The main syntax is available in the `format::strftime` module,
which also serves as a documentation for the syntax.
- A parser (modelled after `strptime(3)`) has been implemented.
See the individual commits for the detailed implementation.
- There are two ways to get a timezone-aware value from a string:
`Offset` or `DateTime<FixedOffset>`. The former should be used
when the offset is known in advance (e.g. assume the local date)
while the latter should be used when the offset is unknown.
Naive types have a simple `from_str` method.
- There are some known problems with the parser (even after
tons of tests), which will be sorted out in 0.2. Known issues:
- This does not exactly handle RFC 2822 and RFC 3339, which
subtly differs from the current implementation in
case-sensitivity, whitespace handling and legacy syntax.
I'd like to integrate #24 for this cause.
- Time zone names are not recognized at all. There is even
no means to get a name itself, not sure about the resolution.
- `Parsed` does *not* constrain `year` to be non-negative,
so manually prepared `Parsed` may give a negative year.
But the current verification pass may break such cases.
- I absolutely don't know about the parser's performance!
- `AUTHORS.txt` has been added, for what it's worth.
- Every type modulo `LocalResult` and `Offset` now implements
`std::fmt::String`, so `.to_string()` can be used.
The exact format has been changed for better looking output.
- `std::fmt::Show` are intended for "stricter" output,
which mostly means the strict ISO 8601 format.
`DelayedFormat` also implements this, but only for inspection.
- `Offset` should implement `Show` but can omit `String`.
The old `name` method is merged into `String` implementations.
- Feature flags used are all accepted.
- Orphan check workaround is no longer required.
- Impl reachability rules prevent the addition of `Duration + others`,
as `Duration` is not implemented in this crate. Removed the impl;
use `others + Duration` as a workaround.
- #[deriving] is now #[derive].
- prelude no longer imports many items by default.
- [T, ..n] is no longer valid.
- a temporary fix for #[derive(Hash)] failing out.
- the formatting error uses a dedicated type instead of `IoError`.