130 Commits

Author SHA1 Message Date
Jubilee Young
be62a7f116 Remove rustc-serialize feature
And docs and deny exceptions and...
2024-03-30 15:01:40 +01:00
Paul Dicker
9511dd29e6 Rename LocalResult to MappedLocalTime, add alias 2024-03-12 13:27:43 +01:00
Ed Morley
81d58e05f7 Improve docs for crate features
The `chrono` crate makes use of several Cargo features:
02c68d69a1/Cargo.toml (L19-L46)

These features are documented in both `README.md` and the rustdocs
in `lib.rs, however, the lists in each place were missing some features
and also inconsistent in their descriptions.

I've also removed the unused `[wasm-bindgen]` link definition.

Fixes #1434.
2024-02-26 08:43:05 +01:00
Paul Dicker
ec557d2843 Specify branch for GitHub Actions badge and fix link 2024-01-26 15:15:50 +01:00
Matt Mastracci
c0f418bbbf Split clock feature into clock and now 2023-11-08 15:48:17 +01:00
Dirkjan Ochtman
dd3f2f81c4 Bump MSRV to 1.61 2023-11-07 11:17:45 +01:00
Paul Dicker
9d7fafe69b Remove mention of oldtime from documentation 2023-09-07 10:28:10 +02:00
Dirkjan Ochtman
d7444990b7 Add Discord link to README 2023-09-05 15:24:15 +02:00
jtmoon79
69d359dbaf README link to codecov report 2023-08-07 16:27:13 +02:00
Paul Dicker
20e73591fc Raise MSRV to 1.57 2023-07-27 14:56:37 +02:00
Paul Dicker
7e6646d85b Update README 2023-05-30 21:18:31 +02:00
Alex Touchet
280208499e Fix GitHub Actions badge 2022-11-08 11:09:09 +01:00
Dirkjan Ochtman
7cd5e03ee4 Fix up internal calls to newly deprecated methods 2022-10-09 14:15:02 +02:00
Dirkjan Ochtman
2162dd7ca6 Remove extensive code examples from README 2022-08-27 15:51:04 +02:00
Dirkjan Ochtman
9c4604c0f8 Make the changelog historical from now on 2022-08-27 15:51:04 +02:00
Eric Sheppard
27c05589ac dont use stub.rs when wasmbind feature is enabled
no longer require wasmbind feature to get js-sys on wasm32-unknown-unknown target

fix comment and remove wasmbind feature from tests

add wasi test

add wasi test
2022-07-28 13:57:09 +02:00
metent
13e1d48365
Remove unused libc dependency from Cargo.toml (#710)
* Remove unused libc dependency from Cargo.toml

* Add libc feature to prevent potentially breaking change

* Document libc dependency removal
2022-06-17 10:55:18 +10:00
Constantin Nickel
0b3a4f5aba Remove superfluous fn main() in doc examples 2022-03-28 21:52:12 +02:00
Dídac Sementé Fernández
3f895ec06b * Adjusted doctest for unstable-locales 2020-12-27 13:14:16 +01:00
Nikhil Benesch
1402e8dd5e
Update duration docs for oldtime feature (#484)
The main crate docs made some claims about the Duration type that became
incorrect with the new oldtime feature (#478).

Per @jhpratt.
2020-09-26 10:57:33 -04:00
Nikhil Benesch
5115c6f5f9
Don't require time crate for clock feature (#478)
Absorb just enough of the time crate that it is no longer required for
the clock feature. v0.1 of the time crate is long deprecated, and v0.2 of
the crate is a complete rewrite.

Vendoring v0.1 allows chrono to control its own destiny. It also means
that downstream users that have upgraded to the time v0.2 ecosystem do
not wind up with both time v0.1 and v0.2 in the dependency tree.

Even with this patch, the dependency on the old time crate remains by
default for backwards compatibility. Specifically, the
`chrono::Duration` type is a re-export of the `time::Duration` type when
the `oldtime` feature is enabled, as it is by default. The intent is
that the `oldtime` feature will be removed when chrono v0.5 is released.

Supersedes #286.
Fixes #400.
2020-09-25 15:14:58 -04:00
Jason
c364de3f55
docs: fix link to cargo docs (#464) 2020-08-05 10:15:05 -04:00
Cecile Tonglet
8d6d83f7b8
Locales and format_localized (#453) 2020-07-31 10:05:40 -04:00
Brandon W Maister
0579d2af08
Document the features available to chrono users (#460) 2020-07-24 20:28:18 -04:00
Brandon W Maister
130253ef2b
Support testing on both main and master (#454) 2020-07-11 13:56:02 -04:00
Brandon W Maister
c2fe38cd84 clean up github workflows ui
This puts different kinds of tests in different job names, instead of
shoehorning them into the matrix.
2020-06-27 15:25:17 -04:00
Brandon W Maister
43db62eda3 Get rid of appveyor and travis configs 2020-06-26 12:37:57 -04:00
Brandon W Maister
8e1fdeaf95 Fix README generation
A previous PR updated the README instead of src/lib.rs, which should have been
caught by CI but was not.
2020-05-27 09:38:01 -04:00
Benoît Courtine
04a58593b3
Add a link to chrono_ext crate (and sources), for non ISO weeks handling (cf. issues #139 and #405). (#406) 2020-04-10 15:27:38 -04:00
Waldir Pimenta
176dfeff87 Reword 'same to' --> 'same as' 2019-12-29 22:27:59 +00: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
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
Guillaume Gomez
b7003373f2 Add doc-comment to test README examples and fix README examples 2019-04-30 23:29:57 +02:00
Pascal Bach
fd22be2c8f Correct link to standard Durtation
The link mentioning standard Duration was still linking to the
Duration from the time crate
2018-10-09 23:19:59 +02:00
Brandon W Maister
94b43fa2e8 Bump Chrono version to 0.4.6 2018-08-25 16:47:10 -04:00
Brandon W Maister
2e563bc652 Make README.md match lib.rs mod documentation
And fail CI in the future if `make readme` isn't run when it is needed.

CC conversation in #185, where the README didn't get updated for a year after
lib.rs was improved.
2018-08-25 16:24:07 -04:00
Alejandro Fernández
4b2a287776
Update broken links to time::Duration 2018-08-06 20:41:02 +02: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
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
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
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
Lance Carlson
11ee30cd77
Update README.md 2018-01-24 18:55:10 -05:00
Lance Carlson
884ad92802
Update README.md
Include the decimal values in the default output format
2018-01-24 11:50:25 -05:00
Kang Seonghoon
fe529c8016
0.4.0: Mass renaming, IsoWeek, SystemTime supports, serde utils.
Starting from this version the `CHANGELOG.md` file is the canonical
source for the list of significant changes. See the file for details.

Fixes #146.
Fixes #159.
2017-06-22 02:59:46 +09:00
Kang Seonghoon
7b9b0c4437
Renamed chrono::UTC to chrono::Utc.
Fixes #148.
2017-06-22 00:33:17 +09:00
Kang Seonghoon
c06bc01f0b
Flattened intermediate implementation modules.
There used to be multiple modules like `chrono::datetime` which only
provide a single type `DateTime`. In retrospect, this module structure
never reflected how people use those types; with the release of 0.3.0
`chrono::prelude` is a preferred way to glob-import types, and due to
reexports `chrono::DateTime` and likes are also common enough.

Therefore this commit removes those implementation modules and
flattens the module structure. Specifically:

    Before                              After
    ----------------------------------  ----------------------------
    chrono:📅:Date                  chrono::Date
    chrono:📅:MIN                   chrono::MIN_DATE
    chrono:📅:MAX                   chrono::MAX_DATE
    chrono::datetime::DateTime          chrono::DateTime
    chrono::datetime::TsSeconds         chrono::TsSeconds
    chrono::datetime::serde::*          chrono::serde::*
    chrono::naive::time::NaiveTime      chrono::naive::NaiveTime
    chrono::naive:📅:NaiveDate      chrono::naive::NaiveDate
    chrono::naive:📅:MIN            chrono::naive::MIN_DATE
    chrono::naive:📅:MAX            chrono::naive::MAX_DATE
    chrono::naive::datetime::NaiveDateTime
                                        chrono::naive::NaiveDateTime
    chrono::naive::datetime::TsSeconds  chrono::naive::TsSeconds
    chrono::naive::datetime::serde::*   chrono::naive::serde::*
    chrono::offset::utc::UTC            chrono::offset::UTC
    chrono::offset::fixed::FixedOffset  chrono::offset::FixedOffset
    chrono::offset::local::Local        chrono::offset::Local
    chrono::format::parsed::Parsed      chrono::format::Parsed

All internal documentation links have been updated (phew!) and
verified with LinkChecker [1]. Probably we can automate this check
in the future.

[1] https://wummel.github.io/linkchecker/

Closes #161. Compared to the original proposal, `chrono::naive` is
retained as we had `TsSeconds` types duplicated for `NaiveDateTime`
and `DateTime` (legitimately).
2017-06-21 14:03:49 +09:00