7.1 KiB
ChangeLog for Chrono
This documents all notable changes to Chrono.
Chrono obeys the principle of Semantic Versioning.
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.2.18 (2016-01-23)
Fixed
- Chrono no longer pulls a superfluous
rand
dependency. (#57)
0.2.17 (2015-11-22)
Added
- Naive date and time types and
DateTime
now have aserde
support. They serialize as an ISO 8601 / RFC 3339 string just likeDebug
. (#51)
0.2.16 (2015-09-06)
Added
- 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)
Changed
- Forbade unsized types from implementing
Datelike
andTimelike
. 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
- Fixed a broken link in the
README.md
. (#41)
0.2.15 (2015-07-05)
Added
-
Padding modifiers
%_?
,%-?
and%0?
are implemented. They are glibc extensions which seem to be reasonably widespread (e.g. Ruby). -
Added
%:z
specifier and corresponding formatting items which is essentially same to%z
but with a colon. -
Added a new specifier
%.f
which precision adapts from the input. This was added as a response to the UX problems in the original nanosecond specifier%f
.
Fixed
-
Numeric::Timestamp
specifier (%s
) was ignoring the time zone offset when provided. -
Improved the documentation and associated tests for
strftime
.
0.2.14 (2015-05-15)
Fixed
NaiveDateTime +/- Duration
orNaiveTime +/- Duration
could have gone wrong when theDuration
to be added is negative and has a fractional second part. This was caused by an underflow in the conversion fromDuration
to the parts; the lack of tests for this case allowed a bug. (#37)
0.2.13 (2015-04-29)
Added
- The optional dependency on
rustc_serialize
and relevantRustc{En,De}codable
implementations for supported types has been added. This is enabled by therustc-serialize
Cargo feature. (#34)
Changed
chrono::Duration
reexport is changed to that of crates.iotime
crate. This enables Rust 1.0 beta compatibility.
0.2.4 (2015-03-03)
Fixed
- Clarified the meaning of
Date<Tz>
and fixed unwanted conversion problem that only occurs with positive UTC offsets. (#27)
0.2.3 (2015-02-27)
Added
DateTime<Tz>
andDate<Tz>
is nowCopy
/Send
whenTz::Offset
isCopy
/Send
. The implementations for them were mistakenly omitted. (#25)
Fixed
Local::from_utc_datetime
didn't set a correct offset. (#26)
0.2.1 (2015-02-21)
Changed
DelayedFormat
no longer conveys a redundant lifetime.
0.2.0 (2015-02-19)
Added
-
Offset
is splitted intoTimeZone
(constructor) andOffset
(storage) types. You would normally see only the former, as the latter is mostly an implementation detail. Most importantly,Local
now can be used to directly construct timezone-aware values.Some types (currently,
UTC
andFixedOffset
) are bothTimeZone
andOffset
, but others aren't (e.g.Local
is not what is being stored to eachDateTime
values). -
LocalResult::map
convenience method has been added. -
TimeZone
now allows a construction ofDateTime
values from UNIX timestamp, viatimestamp
andtimestamp_opt
methods. -
TimeZone
now also has a method for parsingDateTime
, namelydatetime_from_str
. -
The following methods have been added to all date and time types:
checked_add
checked_sub
format_with_items
-
The following methods have been added to all timezone-aware types:
timezone
with_timezone
naive_utc
naive_local
-
parse_from_str
method has been added to all naive types andDateTime<FixedOffset>
. -
All naive types and instances of
DateTime
with time zonesUTC
,Local
andFixedOffset
implement theFromStr
trait. They parse whatstd::fmt::Debug
would print. -
chrono::format
has been greatly rewritten.-
The formatting syntax parser is modular now, available at
chrono::format::strftime
. -
The parser and resolution algorithm is also modular, the former is available at
chrono::format::parse
while the latter is available atchrono::format::parsed
. -
Explicit support for RFC 2822 and 3339 syntaxes is landed.
-
There is a minor formatting difference with atypical values, e.g. for years not between 1 BCE and 9999 CE.
-
Changed
-
Most uses of
Offset
are converted toTimeZone
. In fact, all user-facing code is expected to beOffset
-free. -
[Naive]DateTime::*num_seconds_from_unix_epoch*
methods have been renamed to simplytimestamp
orfrom_timestamp*
. The original names have been deprecated.
Removed
-
Time
has been removed. This also prompts a related set of methods inTimeZone
.This is in principle possible, but in practice has seen a little use because it can only be meaningfully constructed via an existing
DateTime
value. This made many operations toTime
unintuitive or ambiguous, so we simply let it go.In the case that
Time
is really required, one can use a simplerNaiveTime
.NaiveTime
andNaiveDate
can be freely combined and splitted, andTimeZone::from_{local,utc}_datetime
can be used to convert from/to the local time. -
with_offset
method has been removed. Usewith_timezone
method instead. (This is not deprecated since it is an integral part of offset reform.)
0.1.14 (2015-01-10)
Added
- Added a missing
std::fmt::String
impl forLocal
.
0.1.13 (2015-01-10)
Changed
- Most types now implement both
std::fmt::Show
andstd::fmt::String
, with the former used for the stricter output and the latter used for more casual output.
Removed
Offset::name
has been replaced by astd::fmt::String
implementation toOffset
.
0.1.12 (2015-01-08)
Removed
Duration + T
no longer works due to the updated impl reachability rules. UseT + Duration
as a workaround.
0.1.4 (2014-12-13)
Fixed
- Fixed a bug that
Date::and_*
methods with an offset that can change the date are off by one day.
0.1.3 (2014-11-28)
Added
-
{Date,Time,DateTime}::with_offset
methods have been added. -
LocalResult
now implements a common set of traits. -
LocalResult::and_*
methods have been added. They are useful for safely chainingLocalResult<Date<Off>>
methods to makeLocalResult<DateTime<Off>>
.
Changed
-
Offset::name
now returnsSendStr
. -
{Date,Time} - Duration
overloadings are now allowed.
0.1.2 (2014-11-24)
Added
Duration + Date
overloading is now allowed.
Changed
- Chrono no longer needs
num
dependency.
0.1.0 (2014-11-20)
The initial version that was available to crates.io
.