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
Dirkjan Ochtman
3550128fa0
Prefer associated consts for MIN and MAX values
2022-07-04 15:07:06 +02:00
Micha White
39ac80a6a5
Removed a couple of zero-prefixed literals
2022-06-25 22:41:46 +02:00
Dirkjan Ochtman
3ea7149bc7
Bump version to 0.4.20-beta.1
2022-06-25 14:20:36 +02:00
Eric Sheppard
b1d74aef68
remove experimental and clarify why function is fallible
2022-06-21 14:41:36 +02:00
Micha White
cb9239828a
NaiveDateTime
to DateTime
helper method (#711 )
...
* Added a and_timezone method
* Added a couple of tests
* Added the change to the changelog
* Wrong name, silly
* Fixed formatting
* Changed the method name
* Added a disclaimer to the documentation
2022-06-19 22:10:17 +10: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
Sebastián Estrella
8dd7245f85
[ #654 ] Get week start and end days ( #666 )
...
Co-authored-by: David Mazarro <dmunuera@stackbuilders.com>
Co-authored-by: Jorge Guerra <jguerra@stackbuilders.com>
2022-06-15 14:01:18 +02:00
0xc0001a2040
3c0d274aaa
Add AddAssign/SubAssign implementation to DateTime/Date ( #698 )
...
* Impl AddAssign and SubAssign for Date and DateTime
* Add tests for AddAssign and SubAssign
* Add tests for AddAssign and SubAssign on Date
* AddAssign/SubAssign impls mimic their checked methods
* Gate tests for Local timezone behind clock feature
* make sure add/sub_assign_local tests cross a DST transition if relevant
Co-authored-by: Eric Sheppard <key1@eric.sheppard.cloud>
2022-06-11 15:55:34 +10:00
Bryan Henry
d7c743e47a
Make ParseErrorKind public and available through ParseError::kind() ( #588 )
...
Co-authored-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
Co-authored-by: Erlend Langseth <3rlendhl@gmail.com>
2022-06-09 11:34:09 +02:00
Micha White
150f6d1036
Added the change and my username to the changelog
2022-06-09 10:55:09 +02:00
Micha White
ad03bcbdcb
Check for overflow when parsing datetime
2022-06-09 10:55:09 +02:00
Eric Sheppard
50eb7e363d
handle localtime ambiguity
2022-06-09 10:42:30 +02:00
Eric Sheppard
2caab3493e
Test Local functions against date command ( #682 )
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
2e711e7936
Clarify module hierarchy
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
f5218bfa13
sys/unix: cache time zone info
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
4646ec2c1c
sys/unix: parse tzinfo files to find local time offset
...
Based on tz-rs commit b8675e2b5794d923f80970daf9ea548cfb998db2,
with substantial modifications from me.
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
c76d02a72c
sys/unix: inline some more trivial functions
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
6411fcd456
sys/unix: reorder functions
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
8f5c77728a
sys/unix: extract imports to global level
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
f78c833f02
sys/unix: skip conversion to intermediate type
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
83d479bf10
sys/unix: inline more single-use functions
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
e35c0b7b0a
sys/unix: move duplicate code into renamed localize() function
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
d707394bd2
sys/unix: inline uses of Timespec type and methods
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
41cfd49d77
sys/unix: clarify type of time_to_local_tm()
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
e0beafd94f
sys/unix: remove pointless platform guards
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
945d08e6a7
sys/unix: skip conversion to intermediate type
2022-06-09 10:42:30 +02:00
Dirkjan Ochtman
cd27579895
sys: duplicate vaguely platform-specific code
2022-06-09 10:42:30 +02:00
Jake Vossen
7c0bc31a63
Implement std::iter::Sum for Duration ( #522 )
2022-06-09 10:01:13 +02:00
Dirkjan Ochtman
752e69ae1f
Morph elapsed_years() API into years_since()
2022-06-08 14:14:38 +02:00
Yohan Boogaert
1d33cbcb6e
Add elapsed_years
to Date
and DateTime
( #557 )
...
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
2022-06-08 13:06:27 +02:00
Dirkjan Ochtman
3a7d0e4806
Fix formatting in GitHub workflows
2022-06-08 11:39:31 +02:00
Dirkjan Ochtman
6d392f077e
Stop testing very old Ubuntu
2022-06-08 11:39:31 +02:00
Weiyuan Wu
e920210e2f
add missing rkyv derives
2022-06-07 08:04:28 +02:00
Téo Bouvard
5bf8016068
Add support for double ended days+weeks iterators
...
This allows users to use `.rev()` on `.iter_days()` and `.iter_weeks()`,
in order to iterate on dates backwards.
2022-05-24 13:01:22 +02:00
Flurin Feuerstein
8f9b08a01f
Fix typo in month.rs
2022-05-23 11:12:41 +02:00
Ethan D Twardy
7097f933eb
Fix "can't leak crate-private type in stub.rs" #662 ( #684 )
...
First attempt to fix this issue for wasm32-unknown-* targets by
changing visibility of functions not to leak crate-private types.
Ensure the default toolchain is used for the wasm_unknown CI test.
2022-05-12 14:45:47 +02:00
cuishuang
4333e39d13
fix some typos
...
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-26 12:11:52 +02:00
Dirkjan Ochtman
279f590787
Reorder local module in top-down order
2022-04-10 21:42:34 +02:00
Dirkjan Ochtman
8c53efe3cc
Deduplicate logic in datetime_to_timespec() callers
2022-04-10 21:42:34 +02:00
Dirkjan Ochtman
5ac1934bfe
Inline single-use method Tm::to_timespec()
2022-04-10 21:42:34 +02:00