Commit Graph

420 Commits

Author SHA1 Message Date
Evan Schwartz 1de3658433 Add nanoseconds without dots 2018-06-12 10:51:07 -04:00
Brandon W Maister 0ef8c5cc83 Bump Chrono Version to 0.4.3 2018-06-10 21:36:36 -04:00
Brandon W Maister f1852a6d21 Update changelog with TZ Offset Permissive 2018-06-10 21:35:41 -04:00
Brandon W Maister 3c6e807672
Merge pull request #242 from quodlibetor/add-permissive-tz-parsing
Add %#z as "Permissive" timezone parsing
2018-06-10 20:38:09 -04:00
Brandon W Maister c3207a5811 Use the `InternalFixed` struct for TimezoneOffsetPermissive
It is the backcompat scheme that we have. In the 5.x timeline we will add the
more-standard and significantly-more-pleasant-to-expand `#[doc(hidden)]
__DoNotMatchAgainstMe` trick.
2018-06-07 21:46:57 -04:00
Brandon W Maister 9991c2b0ed Rust 1.13 does not support elided lifetimes in const. 2018-06-07 21:46:57 -04:00
Brandon W Maister 95f6a2be1c Add %#z as "Permissive" timezone parsing
This allows you to parse a timezone that:

* Is either `Z` or an actual offset
* Contains no minutes, just the hour

Fixes #219
2018-06-07 21:46:57 -04:00
Brandon W Maister 9276929c58
Merge pull request #247 from HarkonenBade/nanosecond-ts
Nanosecond Timestamps
2018-05-24 13:19:39 -04:00
Thomas Bytheway 5d86c53679 Updated Changelog 2018-05-24 13:49:23 +01:00
Thomas Bytheway 90c75885d0 Rename ts_nano_seconds to ts_nanoseconds 2018-05-24 13:44:12 +01:00
Thomas Bytheway cdb6170f02 Add serde functions for nanosecond timestamps 2018-05-18 11:05:03 +01:00
Thomas Bytheway cc613976a4 Add functions to present DateTime in nanoseconds since epoch 2018-05-18 11:04:39 +01:00
Brandon W Maister 92e1e7d7aa
Merge pull request #241 from gitter-badger/gitter-badge-1
Add a Gitter chat badge to README.md
2018-04-30 14:33:39 -04:00
Brandon W Maister 66005be6a2
Fix position of gitter badge. 2018-04-19 23:28:09 -04:00
The Gitter Badger c2753f1158 Add Gitter badge 2018-04-20 03:23:21 +00:00
Brandon W Maister 97dbfd02ab Bump version for 0.4.2 release 2018-04-07 17:51:56 -04:00
Brandon W Maister 1c4fc66323 Update changelog 2018-04-03 22:36:08 -04:00
Brandon W Maister ebd16f49d2
Merge pull request #237 from tobz1000/datetime-diff-sub
impl Sub<T> for T for Date/Time types
2018-04-03 19:30:15 -07:00
Brandon W Maister 73ba5d7985
Merge pull request #236 from jethrogb/feature_clock
Optionally remove time crate dependency
2018-04-03 09:27:56 -07:00
Toby Dimmick 19466e6ff4 Move `SubAssign<OldDuration> next to `Sub<OldDuration` 2018-04-03 14:16:37 +01:00
Toby Dimmick d9a50cb767 Documentation 2018-04-03 14:14:52 +01:00
Brandon W Maister a9618c8e9d
Merge branch 'master' into feature_clock 2018-04-03 05:54:17 -07:00
Brandon W Maister a060684abe
Merge pull request #174 from quodlibetor/deprecated-warnings-for-rustc_serialize
Deprecated warnings in cargo output for rustc-serialize feature
2018-04-03 05:52:58 -07:00
Brandon W Maister 964d0a2070
Merge pull request #234 from skierpage/patch-1
Update version number to 0.4.1
2018-04-03 05:52:30 -07:00
Toby Dimmick d5d5fd92b7 impl Sub<T> for <T> for Date/Time types 2018-04-03 13:42:03 +01:00
Jethro Beekman 5e68c60bb2 Add clock feature 2018-04-02 08:35:27 -07:00
Brandon W Maister ba1b88ecbc Remove version number from README 2018-04-01 20:08:47 -04:00
skierpage 21d302f0d2
Update version number to 0.4.1
cargo.toml and crates.io are at 0.4.1. I don't know if you want to update the docs link and sample `Cargo.toml` lines.
2018-04-01 17:02:32 -07:00
Brandon W Maister 5aabc29a1f
Merge pull request #232 from phansch/master
Revert "Allow a false-positive clippy lint" as it has been fixed in clippy
2018-04-01 19:00:21 -04:00
Philipp Hansch 3fb0b614e8
Revert "Allow a false-positive clippy lint"
The issue has been fixed with the latest clippy release and we don't
have to `allow` anymore.

This reverts commit 7f990144cc.
2018-04-01 12:40:14 +02:00
Jethro Beekman 6c398ae6f4 Remove dependencies from oldtime::Duration on rest of time crate 2018-03-30 16:08:45 -07:00
Jethro Beekman 5e730ebe4d Vendor oldtime::duration module from time crate
https://github.com/rust-lang-deprecated/time/blob/master/src/duration.rs
2018-03-30 16:08:45 -07:00
Jethro Beekman c368bf16d0 Adjust features selection in CI 2018-03-30 16:08:45 -07:00
Brandon W Maister 39ca2e622c Deprecated warnings in cargo output for rustc-serialize feature
Unfortunately due to rust-lang/rust#39935 placing the annotation on the `impl`s
of `Encodable`/`Decodable` for the various items have no effect whatsoever, so
we need to place it on some type that chrono actually uses internally. The only
*type* that I can find that only exists for rustc-serialize only is the
 `TsSeconds` struct.

So, marking TsSeconds deprecated causes Chrono's internal uses of `TsSeconds`
to emit deprecation warnings, both in our builds and for packages that specify
Chrono as a dependency with the `rustc-serialize` feature active. This means
that the current commit will cause a `warning: use of deprecated item:
RustcSerialize will be removed before chrono 1.0, use Serde instead` to appear
in `cargo build` output.

Unfortunately I don't think that it's possible for downstream crates to disable
the warning the warning in any way other than actually switching to Serde or
using an older chrono. That's the reason for all the `#[allow(deprecated)]`
through the code, it means that the warning appears almost exactly once,
instead of dozens of times.
2018-03-29 14:32:39 -04:00
Brandon W Maister ee52f2f02c
Merge pull request #228 from quodlibetor/0.4.1-release
0.4.1 release
2018-03-27 22:03:00 -04:00
Brandon W Maister 1ddc67ce11 Bump version to 0.4.1 2018-03-26 22:58:57 -04:00
Brandon W Maister d889e3838f Update changelog for 0.4.1 2018-03-26 22:10:45 -04:00
Brandon W Maister 1a983261e3 Ensure that `SecondsFormat` can be expanded semver-safely 2018-03-26 22:10:21 -04:00
Brandon W Maister c9609ea6c9
Merge pull request #217 from dekellum/round
Add SubsecRound trait
2018-03-05 23:23:47 -05:00
David Kellum 449d7277b9 Rename SubSecondRound to SubsecRound
Per review request.
2018-03-05 12:57:26 -08:00
David Kellum 08b7e0bc6b Fix prelude SubSecondRound 2018-03-05 10:40:50 -08:00
David Kellum cb3a73aa86 Rename to (round/trunc)_subsecs; add doc tests 2018-03-05 10:38:48 -08:00
David Kellum 74ec7aa5b2 Improve up/down variable naming 2018-03-04 18:27:36 -08:00
Brandon W Maister 2a825edd5c
Merge pull request #221 from cuviper/num-no_std
Use no_std-compatible num dependencies
2018-03-04 18:21:50 -05:00
Brandon W Maister 312d0898d9
Merge pull request #223 from quodlibetor/allow-clippy-lint
Allow a clippy lint that depends on rust 1.17
2018-03-04 10:32:37 -05:00
Brandon W Maister 7f990144cc Allow a false-positive clippy lint
rust-lang-nursery/rust-clippy#2475 , we'll revert this commit when that's
fixed.
2018-03-04 09:51:41 -05:00
Brandon W Maister 2ee549f84f Allow a clippy lint that depends on rust 1.17 2018-03-04 09:18:02 -05:00
Josh Stone 8f90f405d5 Use no_std-compatible num dependencies
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.
2018-02-23 00:07:16 -08:00
David Kellum b5acb0ed95 Add SubSecondRound extension trait with impl for Timelike 2018-01-30 12:12:16 -08:00
Brandon W Maister ff962d452c
Merge pull request #205 from dekellum/rfc3339pz
Add DateTime to_rfc3339p(z) methods, tests
2018-01-29 22:16:53 -05:00