838 Commits

Author SHA1 Message Date
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
Dirkjan Ochtman
b36663b03b Fold top-level sys module into offset::local 2022-04-10 21:42:34 +02:00
Dirkjan Ochtman
5f59b2c24f Move sys module into offset, which is the only place using it 2022-04-10 21:42:34 +02:00
danielalvsaaker
29cbd5945c
Update absolute path to 2018 syntax for WASM/wasmbind feature (#672) 2022-04-09 14:17:43 +02:00
Yureka
49838124ff some lint errors from the 1.60 upgrade 2022-04-09 13:04:53 +02:00
Yureka
4cfcd405d1 add changelog entry 2022-04-09 13:04:53 +02:00
Yureka
a9ec3c9ca3 add wasm32-unknown-emscripten test 2022-04-09 13:04:53 +02:00
Yureka
a12cf7b724 use stub for anything not unix and not windows 2022-04-09 13:04:53 +02:00
Constantin Nickel
82407ffa9e Update bincode to 1.3 2022-04-05 15:50:52 +02:00
Constantin Nickel
4781689a39 Remove fallible fn main() in doc examples 2022-03-28 21:52:12 +02:00
Constantin Nickel
0b3a4f5aba Remove superfluous fn main() in doc examples 2022-03-28 21:52:12 +02:00
Constantin Nickel
c9db7d1f92 Remove extern crate statements from benches, tests & doc examples 2022-03-28 21:52:12 +02:00
Constantin Nickel
a6bf842a03 feat(naive): add serde modules for optional timestamps
- `naive::serde::ts_nanoseconds_option`
- `naive::serde::ts_microseconds_option`
- `naive::serde::ts_milliseconds_option`
- `naive::serde::ts_seconds_option`
2022-03-24 17:30:47 +01:00
Constantin Nickel
6471b362da feat(naive): add serde module for microseconds serialization 2022-03-24 17:30:47 +01:00
Weiyuan Wu
c2e9f61304 tidy up imports 2022-03-23 22:06:48 +01:00
Weiyuan Wu
0ec64a9723 add optional rkyv support 2022-03-23 22:06:48 +01:00
Constantin Nickel
3105ff5bb9 docs(serde): fix some copy & paste errors 2022-03-23 17:12:56 +01:00
Constantin Nickel
d90544b764 docs(naive): Remove unused imports in examples 2022-03-23 17:12:56 +01:00
Milo
d6d02ac5e5
Merge pull request #661 from chronotope/cleanups 2022-03-22 07:18:12 +00:00
Dirkjan Ochtman
66898813de Reduce lint allowing 2022-03-21 22:32:31 -07:00
Dirkjan Ochtman
aab30ef19d Split naive::time module into separate files 2022-03-21 22:32:31 -07:00
Dirkjan Ochtman
0cd8fa8653 Split naive::datetime module into different files 2022-03-21 22:32:31 -07:00
Dirkjan Ochtman
947914917e Split datetime module into different files 2022-03-21 22:32:31 -07:00
Dirkjan Ochtman
2368e37f8e Adopt modern clippy suggestions 2022-03-21 22:20:27 -07:00
Dirkjan Ochtman
0648088e4a Group module declarations and re-exports 2022-03-21 21:45:23 -07:00
Dirkjan Ochtman
c68a2b7bb8 Move serde test helpers to an appropriate module 2022-03-21 21:43:24 -07:00
Dirkjan Ochtman
4ebfb0d87f Clarify interface for sys module 2022-03-21 21:34:53 -07:00
Dirkjan Ochtman
ffb877e2f4 Move tests into appropriate modules 2022-03-21 21:27:42 -07:00
Dirkjan Ochtman
733aa10a63 Get rid of most extern crate statements 2022-03-21 21:27:42 -07:00
Dirkjan Ochtman
36a6e0de0c Move naive module contents into a separate file 2022-03-21 21:27:42 -07:00
Dirkjan Ochtman
b72d747423 Delete div module in favor of direct imports 2022-03-21 21:27:42 -07:00
Dirkjan Ochtman
65dd625e16 Move Datelike and Timelike traits into a traits module 2022-03-21 21:27:42 -07:00