977 Commits

Author SHA1 Message Date
Milo
895906a810
Merge pull request #652 from chronotope/clippy 2022-02-28 17:20:24 +00:00
Dirkjan Ochtman
216c18f62a Clean up clippy warnings 2022-02-28 18:05:35 +01:00
Milo
f6bd567bb6
Merge pull request #568 from orion78fr/main 2021-10-30 11:27:03 +01:00
Milo
e0656ac944
Merge branch 'main' into main 2021-10-30 11:02:52 +01:00
Milo
fea3392034
Merge pull request #611 from nickelc/serde-module 2021-10-28 19:20:24 +01:00
Constantin Nickel
592f23f5dc style(serde): Fix some clippy warnings
clippy::inconsistent_digit_grouping
clippy::needless_question_mark
clippy::redundant_closure
2021-10-28 14:45:55 +02:00
Constantin Nickel
175c9c462f refactor(serde): Use the associated type as return value in Visitor impl 2021-10-28 14:45:55 +02:00
Constantin Nickel
f2f7882e1b perf(serde): Use Formatter.write_str when writing string literals 2021-10-28 14:45:55 +02:00
Constantin Nickel
bf6ffe67f6 chore(datetime): Reorder code of the serde module
Move the default Serialize/Deserialize impls before the `ts_*` modules
Move the `ts_nanoseconds_option` module behind the `ts_nanoseconds` module

The modules are now ordered in the following way:
- ts_nanoseconds, ts_nanoseconds_option
- ts_microseconds, ts_microseconds_option
- ts_milliseconds, ts_milliseconds_option
- ts_seconds, ts_seconds_option
2021-10-28 14:45:40 +02:00
Milo
f4f5c2fa8d
Merge pull request #609 from Milo123459/ci-caching 2021-10-26 10:12:08 +01:00
Milo
1e49400f42
Merge pull request #572 from retrhelo/localdate 2021-10-26 10:10:42 +01:00
Milo
9c7eee4239 use it every where else 2021-10-26 10:00:35 +01:00
Milo
85abd0120e use cache in no_std 2021-10-26 09:59:33 +01:00
Milo
88e491569a fix uses 2021-10-26 09:56:25 +01:00
Milo
c4306b2155 caching 2021-10-26 09:52:35 +01:00
retrhelo
928a32f3d0 modify Datetime::from_local() to pass fmt tests 2021-10-26 11:17:00 +08:00
Artyom Liu
3d88d823ae
Merge branch 'chronotope:main' into localdate 2021-10-26 10:49:28 +08:00
Milo
7a357cdaca
Merge pull request #533 from nickelc/datetime-serde-micro-opt 2021-10-25 19:01:18 +01:00
Milo
e5dfc1b79b
Merge pull request #530 from nickelc/remove-try 2021-10-25 18:43:00 +01:00
Milo
0f037702be
Update CHANGELOG.md 2021-10-25 17:47:52 +01:00
Brandon W Maister
61ee2fc9af
Merge pull request #605 from quodlibetor/ci-update-old-ubuntu 2021-10-18 22:15:45 -04:00
Brandon W Maister
f03bce1b15 lint: Some new rustc lints. 2021-10-18 22:03:10 -04:00
Brandon W Maister
4b2c510ded clippy: Allow wrong-self-convention 2021-10-18 22:03:10 -04:00
Brandon W Maister
0a8702d845 ci: Ubuntu 16.04 is no longer supported by GH 2021-10-18 22:03:10 -04:00
retrhelo
f4302b5b52 add DateTime::from_local() 2021-07-01 14:47:41 +08:00
Guillaume Turchini
b3cea49919
Update CHANGELOG.md 2021-06-05 03:44:12 +02:00
Guillaume Turchini
a27b83e4d2
Fix compiling for wasm32-unknown-emscripten target
error[E0428]: the name `inner` is defined multiple times
  --> /github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.19/src/sys.rs:25:1
   |
21 | mod inner;
   | ---------- previous definition of the module `inner` here
...
25 | mod inner;
   | ^^^^^^^^^^ `inner` redefined here
   |
   = note: `inner` must be defined only once in the type namespace of this module
2021-06-05 02:34:46 +02:00
Constantin Nickel
4a45e98b0d Add serde functions for optional microsecond timestamps 2021-01-31 12:08:16 +01:00
Constantin Nickel
01eb99b20a Remove redundant imports 2021-01-29 22:10:41 +01:00
Constantin Nickel
118c980d88 Replace try! macro with question mark 2021-01-29 17:14:56 +01:00
Brandon W Maister
3467172c31
Merge pull request #506 from DiD92/add-default-impl
Add Default implementation for naive date types
2021-01-22 12:13:10 -05:00
Brandon W Maister
19ec092d3a
Document Duration's Display format (#517) 2021-01-22 12:12:23 -05:00
Rob Young
2b53360471
Allow manual_range_contains clippy lint (#525)
Range::contains was only stabilized in 1.35 and Chrono supports rustc
back to 1.13.
2021-01-22 12:10:56 -05:00
Dídac Sementé Fernández
a1cbbaab61 * Modified documentation examples
* Fixed typo in NaiveTime docs for Default
2020-12-31 15:32:02 +01:00
Dídac Sementé Fernández
c601041534 * Added missing config flag 2020-12-27 14:08:39 +01:00
Dídac Sementé Fernández
9bf16699b0 * Added Default implementations for Utc, Local and FixedOffset timezones 2020-12-27 14:03:07 +01:00
Dídac Sementé Fernández
3f895ec06b * Adjusted doctest for unstable-locales 2020-12-27 13:14:16 +01:00
Dídac Sementé Fernández
a2b6d94e42 * Fixed tests 2020-12-27 12:07:55 +01:00
Rob Young
b0f32832a7
Add documentation for DateTime FromStr impl (#516)
Resolves #505
2020-12-22 11:04:17 -05:00
Brandon W Maister
f1021f635b
Merge pull request #511 from ObsidianMinor/fix/now-milliseconds-in-conversion
Simplify conversion between JS Date and DateTime<Utc>
2020-12-21 15:03:41 -05:00
Sydney Acksman
741b30adab Simplify JS Date <-> DateTime<Utc> conversion 2020-12-21 13:18:06 -06:00
Brandon W Maister
e3c42c4f7a
Merge pull request #509 from robyoung/feature/duration-round-for-naive-datetime
Feature/duration round for naive datetime
2020-12-20 18:19:40 -05:00
Brandon W Maister
46dee626e8
Merge pull request #510 from robyoung/backtick-doctest-examples
Use backticks for documentation examples
2020-12-20 18:17:36 -05:00
Rob Young
c9778f7583 Use backticks for documentation examples
The rustdoc documentation and the book only show examples as escaped
with backticks.
2020-11-30 21:54:46 +00:00
Rob Young
312b7b3704 Implement DurationRound for NaiveDateTime
This is off the back of [this
comment](https://github.com/chronotope/chrono/pull/445#issuecomment-717323407).
2020-11-30 21:05:05 +00:00
Rob Young
80b285983f Fix chrono::DurationRound is not TZ aware
Fixes #495
2020-11-30 21:03:11 +00:00
Dídac Sementé Fernández
43e5f2a671 * Removed non naive Default implmentations 2020-11-24 23:41:59 +01:00
Dídac Sementé Fernández
c0643e193f * Added Default implementation for NaiveDateTime, NaiveDate and NaiveTime
* Added Default implmentation for DateTime and Date
2020-11-24 22:57:20 +01:00
Brandon W Maister
2e0936bc3d
Merge pull request #504 from quodlibetor/date-prompt-naive
Push more prominently for folks to use NaiveDate over Date
2020-11-20 13:49:52 -05:00
Brandon W Maister
8c7e192a62 handle clippy::single-char-add-str 2020-11-20 12:38:35 -05:00