Commit Graph

513 Commits

Author SHA1 Message Date
Brandon W Maister 6ce91fbfbb allow deprecated inclusive range patterns
We still support ancient Rust.
2019-08-31 15:40:11 -04:00
Brandon W Maister a70c5cdc79 Bump Chrono version to 0.4.8 2019-08-31 15:26:32 -04:00
Brandon W Maister 6429cd2780 Add CHANGELOG entry for wasm-unknown-unknown
Features added in #287 and #331
2019-08-31 15:22:01 -04:00
Brandon W Maister 3e180b711e
Merge pull request #331 from evq/wasm
basic wasm support
2019-08-23 15:54:20 -04:00
eV cc073a650f remove cargo web / compile time error 2019-08-22 08:09:56 +00:00
eV f21b1fbf21 Fix emscripten and guard against cargo test + wasm32-unknown-unknown 2019-08-16 22:46:10 +00:00
eV f52a29398c one more guard 2019-08-16 21:10:55 +00:00
eV e28719eb0d try to get travis working for rust 1.13.0 2019-08-16 21:04:07 +00:00
eV bd22644b05 only use nvm on mac 2019-08-16 20:04:45 +00:00
eV 93e4f29ee4 see if it was just the particular tz 2019-08-16 19:24:48 +00:00
eV ddc7fd4a04 try node 11 2019-08-16 19:14:16 +00:00
eV a7645f3e73 try to use nvm to use node 10 2019-08-16 18:23:28 +00:00
eV c284d7364b add conditionals so wasm tests build / run in the right places 2019-08-16 17:11:30 +00:00
eV 5d38faeb40 fix local timezone, add tests 2019-08-16 09:35:56 +00:00
Joey Ezechiels 8bfaca9f9b Add {Utc,Local}::now() constructor versions for the `wasm32` arch
While likely providing only incomplete support for WebAssembly, this
commit opens up chrono for use on the wasm32 architecture.
2019-08-16 07:46:02 +00:00
Brandon W Maister 7412469623
Merge pull request #325 from chronotope/double-check-negative-odd-timestamp-millis
Add a test for negative odd-numbered timestamp_millis
2019-08-06 21:25:35 -04:00
Brandon W Maister 1935cc1a18
Merge pull request #327 from lkolbly/master
Fix README specification for number_from_monday()
2019-07-18 08:27:34 -05:00
Lane Kolbly 63920fe65b Put change back into README 2019-07-18 08:02:45 -05:00
Lane Kolbly c80878ce4e Change src/lib rather than readme directly 2019-07-18 07:37:37 -05:00
Lane Kolbly 91fac79807 Fix README specification for number_from_monday() 2019-07-13 10:01:55 -05:00
Brandon W Maister f0ea789a9c Add a test for negative odd-numbered timestamp_millis
Just in case, because of #324
2019-06-27 20:40:35 -04:00
Brandon W Maister a448800727 Add CHANGELOG entry for upcoming unreleased changes 2019-06-25 09:44:13 -04:00
Brandon W Maister 1499de251a
Merge pull request #323 from chronotope/wyhaya-patch-1
Add '0' to RFC2822
2019-06-25 08:43:39 -05:00
Brandon W Maister b1592e0e22 Add parse tests for fws and leading-0 to RFC2822 2019-06-24 22:05:06 -04:00
wyhaya a1d304b035 Add '0' to RFC2822 2019-06-24 22:05:06 -04:00
Brandon W Maister 77e2770758
Merge pull request #320 from SamokhinIlya/DelayFormatAlign
DelayFormat now works with alignment and width
2019-06-24 20:36:09 -05:00
Brandon W Maister d8c68f6bd0 Bump Chrono version to 0.4.7 2019-06-24 20:56:40 -04:00
Samokhin Ilya 5b0818e0a1 changed back from impl Trait in fn parameter to support older compiler versions 2019-06-23 10:09:47 +03:00
Samokhin Ilya f57ac3671e add test and format every item into String first, then pad it 2019-06-23 09:43:06 +03:00
Brandon W Maister 403af6b298 Change README chrono version links to just 0.4
docs.rs redirects to the latest version in that range.
2019-06-21 17:49:50 -04:00
Brandon W Maister 579679b9c3 Add changelog entry for 0.4.7 2019-06-21 17:11:01 -04:00
SamokhinIlya 8b2444c27f DelayFormat now works with alignment and width 2019-06-21 23:44:49 +03:00
Brandon W Maister 96c451ec20
Merge pull request #316 from GuillaumeGomez/doc-test
Add doc-comment to test README examples and fix README examples
2019-05-01 22:07:13 -04:00
Guillaume Gomez b7003373f2 Add doc-comment to test README examples and fix README examples 2019-04-30 23:29:57 +02:00
Brandon W Maister 1407309b87
Merge pull request #313 from kennytm/inline-fixed-offset-getters
Mark `FixedOffset::{local_minus_utc, utc_minus_local}` as `#[inline]`.
2019-04-22 10:46:06 -04:00
kennytm 20a0ab7a47
Mark `FixedOffset::{local_minus_utc, utc_minus_local}` as `#[inline]`. 2019-04-22 03:07:01 +08:00
Brandon W Maister 7bc2cd8641
Merge pull request #312 from kennytm/derive-for-local-result
derive {Copy, Eq, Hash} for LocalResult.
2019-04-21 13:05:04 -04:00
kennytm d3dc9c0e10
derive {Copy, Eq, Hash} for LocalResult. 2019-04-21 15:42:11 +08:00
Brandon W Maister bcdc66a4f8
Merge pull request #271 from mqudsi/offset_convert
Add std::convert::From conversion between different DateTime offsets
2019-04-08 12:37:01 -04:00
Mahmoud Al-Qudsi 43447e5dbf Update Changelog to mention `std::convert::From` conversions 2019-04-08 10:15:19 -05:00
Mahmoud Al-Qudsi ad6872c498 Predicate `Local` conversion fns on `clock` feature 2019-04-08 10:06:30 -05:00
Brandon W Maister 5dc8a68dde
Merge pull request #308 from jean-airoldie/time_zone_from_nanos
Add timestamp_nanos generated method for TimeZone
2019-04-07 17:41:52 -04:00
Brandon W Maister cd2c58816d
Merge pull request #311 from quodlibetor/document-timestamp-nanos-panics
Document timestamp_nanos panics
2019-04-07 17:40:22 -04:00
Brandon W Maister 95bf861ceb Disable libc default features so it builds on rust 1.13 2019-03-31 19:03:18 -04:00
Brandon W Maister 855a894393 Don't warn on deprecated trim functions 2019-03-31 19:03:18 -04:00
Brandon W Maister 33800c876b Add docs around panic behavior around timestamp_nanos
Document panic behavior that should have been documented better.

Resolves #310
2019-03-31 19:03:18 -04:00
jean-airoldie c92544923d Add timestamp_nanos generated method for TimeZone 2019-03-06 10:32:40 -05:00
Brandon W Maister 77110ffecb
Merge pull request #292 from cmars/negative_timestamp_millis
Fix panic for negative inputs to timestamp_millis.
2018-12-04 15:47:03 -05:00
Casey Marshall b39597f537 Fix panic for negative inputs to timestamp_millis.
This patch fixes the case where a negative millisecond offset is passed
to Timezone::timestamp_millis and timestamp_millis_opt and adds a test
case for it. Without this patch, calling timestamp_offset with a
negative value will panic with an overflow like this:

```
---- tests::test_parse_samples stdout ----
thread 'tests::test_parse_samples' panicked at 'attempt to multiply with
overflow',
/home/c/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.6/src/offset/mod.rs:349:34
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a
verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing:👿:unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:221
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:477
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:391
   6: rust_begin_unwind
             at libstd/panicking.rs:326
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:77
   8: core::panicking::panic
             at libcore/panicking.rs:52
   9: chrono::offset::TimeZone::timestamp_millis_opt
             at
/home/c/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.6/src/offset/mod.rs:349
  10: chrono::offset::TimeZone::timestamp_millis
             at
/home/c/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.6/src/offset/mod.rs:327
```
2018-12-02 11:26:42 -06:00
Brandon W Maister 5dc483990a
Merge pull request #282 from 3point2/doc-grammar
Grammar fix for docs
2018-11-26 23:23:36 -05:00