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`.
- `Eq` no longer accepts the reflexive type parameter.
(this doesn't change the actual interface, as `Eq` is simply
a marker for total ordering. `PartialEq` retains it.)
- `Copy` is now opt-in. Every `Copy`able type is made to implement
`Copy`. While unlikely, I haven't deeply thought about
`Copy`ability so it might change in 0.2.
- `Date::and_date` might behave incorrectly with a large `Offset`;
this is now fixed.
- Added a BIG (friendly) limitation section to the README.
- better documentation :)
- `Offset::name` now returns `SendStr`.
- `Date/Time - Duration` is now supported.
- `with_offset` methods have been added.
- `LocalResult` now implements common traits.
- `LocalResult` has several methods to propagate errors.
this makes the initialization from untrusted sources easier.
- `num` dependency is gone. It was only used for floored division
and it is not hard to copy only that portion from num.
- `Duration + Date` (or so) was blocked by rust-lang/rust#7590,
which has been subsequently fixed.
- Removed unused `unsafe` checks.
- `std::fmt::WriteError` is now `std::fmt::Error`.
- abandoned rust-ci for documentations (sorry, but it didn't work
nowdays ;_;), we are now publishing directly to Github pages.