Dirkjan Ochtman
f90a0ffb98
Deduplicate logic in from_timestamp_millis()
2022-09-19 15:36:22 +02:00
Pavel Pscheidl
926f7bf288
NaiveDateTime::from_timestamp_millis(_opt)
...
Construct NaiveDateTime from millis since epoch
2022-09-19 15:36:22 +02:00
Eric Sheppard
42ca8ca88d
duplicate add/sub days tests
2022-08-29 10:57:07 +02:00
Eric Sheppard
9a2ba95388
to -> from
2022-08-29 10:57:07 +02:00
Eric Sheppard
181b083647
add/sub Days
...
docs fixes
improve checked impls
2022-08-29 10:57:07 +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
René Kijewski
17d8c2af86
Update CHANGELOG
2022-08-22 20:26:38 +02:00
René Kijewski
e1b2675cbf
Update documentation test on CI
2022-08-22 20:26:38 +02:00
René Kijewski
16b2ae4156
Add feature documentation for docs.rs
...
This way the documentation will thell user which feature(s) are needed
to use a function, trait, etc. docs.rs display the information like
> Available on crate feature `serde` only.
2022-08-22 20:26:38 +02:00
René Kijewski
5b1b812a74
Feature is already implied
2022-08-22 20:26:38 +02:00
René Kijewski
8ebee9b977
Fix broken link in documentation
2022-08-22 20:26:38 +02:00
Eric Sheppard
3ee9bfd182
checked+regular add/sub months impls
...
add test
fix spelling :D
2022-08-22 15:11:01 +02:00
Lachezar Lechev
1b877c389d
Re-export Duration's OutOfRangeError ( #541 )
2022-08-22 22:49:29 +10:00
Brent Gardner
cd6d42bafd
Impl Add<Month> + Sub<Month> for NaiveDateTime ( #778 )
...
Co-authored-by: Eric Sheppard <github@eric.sheppard.cloud>
2022-08-18 17:40:34 +02:00
Jarosław Konik
5f5410163b
GNU coreutils date
-like time zone formatting ( #759 )
...
Co-authored-by: Eric Sheppard <key2@eric.sheppard.cloud>
2022-08-17 18:41:48 +02:00
Alexander Tesfamichael
a383abf30e
Clarify serde module contains defaults too in docs ( #777 )
...
Makes it more clear the serde module isn't *only* for alternatives it
is also required for the default implementations.
2022-08-15 10:01:42 +02:00
Mohammad AlSaleh
8275b13941
strftime: Improve "%+" documentation ( #769 )
2022-08-14 13:56:27 +02:00
Eric Sheppard
45142764ab
update changelog
...
remove extra ]
v0.4.22
2022-08-13 15:33:52 +02:00
Dirkjan Ochtman
db8bde3acf
Apply clippy suggestions
2022-08-13 15:33:52 +02:00
Dirkjan Ochtman
f6b575ceee
Bump version number to 0.4.22
2022-08-13 15:33:52 +02:00
Dirkjan Ochtman
af69b903f6
Require iana-time-zone 0.1.44
2022-08-13 15:33:52 +02:00
Eric Sheppard
84f98e01c7
set fallback feature in iana-time-zone depedency
2022-08-12 17:52:25 +02:00
Trevor Arjeski
511d368990
Add sgx build to CI
2022-08-12 17:52:25 +02:00
Trevor Arjeski
bee614a305
Do not include iana-time-zone for sgx
...
In previous version chrono with default features built successfully on the sgx platform. Since `iana-time-zone` is not implemented for this platform, do not include it when `target_env = "sgx"`.
2022-08-12 17:52:25 +02:00
Eric Sheppard
fe4bd220d2
allow optional wasmbindgen
...
use wasmbind feature
2022-08-12 13:49:11 +02:00
Dirkjan Ochtman
95223ee267
format: be specific about support year range
2022-08-10 07:16:49 +02:00
Dirkjan Ochtman
2d22e57b46
Bump version number to 0.4.21
v0.4.21
2022-08-09 16:18:25 +02:00
Eric Sheppard
557bcd5f44
handle missing /etc/localtime on some unix platforms ( #756 )
...
* msrv -> 1.38
* default to UTC when iana-time-zone errors and /etc/localtime is missing, support android
fix function name
2022-08-09 23:43:30 +10:00
Alex Gaynor
5edf4d0cc7
fixes #758 -- correctly document that %Y parses negative years ( #760 )
2022-08-09 22:15:17 +10:00
Dirkjan Ochtman
a185d3bdfa
Remove unnecessary try_opt!() macro
2022-08-08 16:02:41 +02:00
Dirkjan Ochtman
0b7feacb54
Clean up some unreachable_pub warnings
v0.4.20
2022-08-04 16:44:23 +02:00
Dirkjan Ochtman
65f1f2e588
Bump version to 0.4.20
2022-08-04 16:44:23 +02:00
Dirkjan Ochtman
bd3b48d1a9
Revise Months API
...
* Provide `checked_add_months()` and `checked_sub_months()` for
callers that would like to avoid panics
* Document panic potential in `Add` and `Sub` implementations
* Implement additional traits for `Months` per API guidelines
* Hide inner type for `Months` and add constructor
* Use lower-level APIs to clamp day
2022-08-04 16:05:25 +02:00
Brent Gardner
ab688c384f
Implement Add<Months>
and Sub<Months>
for NaiveDate
( #731 )
...
* Add add_months()
* Months struct with Add and Sub impls
* Update changelog
2022-07-30 22:39:13 +10:00
Kevin Cox
782f904375
Clarify docs for DateTime::with_timezone
...
The previous docs don't really make sense, why am I calling a method if it doesn't change the value? The new wording clarifies what is held the same and what changes.
2022-07-29 16:43:51 +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
Eric Sheppard
56f80e4366
run on all branches and also for changes in the ci folder
2022-07-28 13:57:09 +02:00
Dirkjan Ochtman
353f1795b6
Implement std::error::Error for ParseWeekdayError
2022-07-27 16:29:50 +02:00
Michael
309cbeb054
Fixed typo in deprecation notice
2022-07-27 08:47:47 +02:00
Dirkjan Ochtman
26e231af33
Bump version to 0.4.20-rc.1
v0.4.20-rc.1
2022-07-26 14:20:42 +02:00
Finomnis
5eacc0a698
Fixed incorrect whitespace parsing; added more tests
2022-07-26 09:59:19 +02:00
Eric Sheppard
b2430c2b77
change to raw strings
2022-07-26 09:59:19 +02:00
Dirkjan Ochtman
ad1fe57f9b
Simplify RFC 2822 comment parser
2022-07-26 09:59:19 +02:00
Eric Sheppard
0903ab1a19
use thread_local cache of parsed version of previous TzInfo file or TZ variable ( #728 )
...
minor fixes
improve ergonomics, cache mtime for 1s
1.32 fixes
avoid excess Cache::default() calls
add back cfg_attr
2022-07-25 22:12:35 +10:00
Finomnis
acd4ecf09f
Add compatibility with rfc2822 comments ( #733 )
...
* Add compatibility with rfc2822 comments
* Refactor rfc2822 comment parser
v0.4.20-beta.1
2022-07-24 20:17:38 +10:00
Andre Braga Reis
187819ff43
Update the changelog
2022-07-15 09:04:09 +02:00
Andre Braga Reis
07e4dcef00
Fix Duration::abs when nanos is not zero
2022-07-15 09:04:09 +02:00
Eric Sheppard
051e1170c4
fix clippy lint
2022-07-07 15:44:39 +02:00
Dirkjan Ochtman
686f72038e
Simplify cross installation
2022-07-04 15:07:06 +02:00