666 Commits

Author SHA1 Message Date
Rob Young
6b600e83e8
Allow manual-non-exhaustive (#458)
It is needed as the non_exhaustive attribute is not available on 1.13.0.

This should fix the broken linting.
2020-07-24 12:21:12 -04:00
Brandon W Maister
130253ef2b
Support testing on both main and master (#454) 2020-07-11 13:56:02 -04:00
Rob Young
aaee912228
Add MIN and MAX DateTime, Time and NaiveDateTime (#452)
Resolves #386
2020-07-10 17:32:19 -04:00
Brandon W Maister
a905c556d8
Add unreleased section to changelog (#448) 2020-07-06 08:53:58 -04:00
Brandon W Maister
2b5437ded0
Merge pull request #447 from quodlibetor/rel-v0.4.13
Release v0.4.13
v0.4.13
2020-07-05 18:58:12 -04:00
Brandon W Maister
13c2f0bfc2 Pin version of shellcheck
0.4.0 caused https://github.com/ludeeus/action-shellcheck/issues/21
2020-07-05 18:56:17 -04:00
Brandon W Maister
cc0e795b59 Release v0.4.13 2020-07-05 18:50:00 -04:00
Brandon W Maister
6be7be37fc
Merge pull request #446 from schrieveslaach/feature/js-sys-date-improvements
Improve From<js_sys::Date> Variants for DateTime<Utc>
2020-07-05 18:34:27 -04:00
Brandon W Maister
073d86a3b1 Simplify math, add a js_sys test for correctness 2020-07-05 16:50:58 -04:00
Brandon W Maister
b6d7bac99a Fix wasm testing
wasm-bindgen-test and wasm-bindgen need to be different versions (0.3 and 0.2,
respectively), otherwise no tests are found([1], [2]);

This also fixes the test to and ci runner to just test in the current env/tz,
thereby requiring that js_sys returns the same timezone as the host system
thinks it is, but not otherwise trying to set the TZ.

[1]: https://users.rust-lang.org/t/wasm-bindgen-test-and-no-tests-to-run/43444
[2]: https://github.com/rustwasm/wasm-bindgen/pull/2123
2020-07-05 16:50:58 -04:00
Marc Schreiber
545fd9f863 Improve From<js_sys::Date> Variants for DateTime<Utc> 2020-07-05 16:50:57 -04:00
Rob Young
4348cd13c7
Add rounding and truncating by Duration (#445)
Resolves #280
2020-07-05 14:06:11 -04:00
Brandon W Maister
e90050c852
Prepare changelog for next release (#444) 2020-07-01 21:56:41 -04:00
Brandon W Maister
cc943c9650
Only run tests when rust files have changed (#443) 2020-07-01 18:27:38 -04:00
Brandon W Maister
311659f2cc
Release v0.4.12 (#442) v0.4.12 2020-07-01 18:21:04 -04:00
Brandon W Maister
ea2d2da905
Remove oldtime::Duration::seconds_nanos (#441)
It causes a different _increased_ API when features are _disabled_.

It'll be re-added when #286 is finished
2020-07-01 18:08:15 -04:00
Brandon W Maister
8bc94d5281
Use js runtime for Local offset in js environment (#412)
Possible fix for #411
2020-06-29 19:02:24 -04:00
Brandon W Maister
0e0178adfe
Merge pull request #439 from quodlibetor/lint-alot
Lint things: clippy and rustfmt
2020-06-29 18:49:00 -04:00
Brandon W Maister
e4a6f3e830 wasm-pack appears to segfault occasionally on ubuntu
See this for example, where it segfaulted on `--version`:

https://github.com/chronotope/chrono/pull/412/checks?check_run_id=814649507

Probably the same thing as https://github.com/rustwasm/wasm-pack/issues/823
2020-06-27 17:25:38 -04:00
Brandon W Maister
c788a4495b Add a lint for cargo fmt
This also adds the cargo fmt commit to the (new) .git-ignore-revs file which
can cause it to not show up in `git blame` either with `--ignore-revs-file` or
`git config blame.ignoreRevsFile .git-ignore-revs`
2020-06-27 17:10:38 -04:00
Brandon W Maister
febb8dc168 rustfmt everything 2020-06-27 17:04:22 -04:00
Brandon W Maister
e0412b7813 Enable clippy lints and deny all warnings 2020-06-27 16:55:15 -04:00
Brandon W Maister
77ade72ec8 clippy: match_ref_pats 2020-06-27 16:55:15 -04:00
Brandon W Maister
991a8c1bd8
Add a pull-request template (#438) 2020-06-27 16:10:10 -04:00
Brandon W Maister
b98c0cf62c
Update changelog to include changes since last release (#435) 2020-06-27 16:09:40 -04:00
Brandon W Maister
bdc58a8ac1
Merge pull request #436 from quodlibetor/github-actions
Migrate to github actions from travis + appveyor
2020-06-27 15:41:40 -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
ad2461062f Deal with time not working on windows with rust 1.13 2020-06-21 23:55:41 -04:00
Brandon W Maister
ee6447c8c2 windows has lower system time granularity than unix 2020-06-21 23:55:41 -04:00
Brandon W Maister
bc66f2aa48 remove unnecessary paren 2020-06-21 23:55:41 -04:00
Brandon W Maister
2e11b5949c remove unused imports 2020-06-21 23:55:41 -04:00
Brandon W Maister
9ccc65aeda Fix oldtime, make it more clear what's going on 2020-06-21 23:55:41 -04:00
Brandon W Maister
2c81fa8c1a clean up clippy lints 2020-06-21 23:55:41 -04:00
Brandon W Maister
4ae60dfb84 Add github actions config 2020-06-21 23:38:45 -04:00
Sean Loiselle
9ad1956cb1
add secs_nanos function to support total nanoseconds > max i64 in constructor (#426) 2020-06-21 10:25:22 -04:00
Brandon W Maister
ce62f917b7
Merge pull request #418 from abreis/abs_duration
Implement .abs() for Duration
2020-06-16 21:11:37 -04:00
Brandon W Maister
a10ced77f9
Merge pull request #433 from eaufavor/fix-rfc2822-comment
Fix comment: correct the comment of RFC2822 format
2020-06-16 21:09:59 -04:00
Yuchen Wu
65eebdaaaa Fix comment: correct the comment of RFC2822 format
d.day() is u32 so the padding here is '0'(%d) not ' '(%e).
2020-06-16 13:08:52 -07:00
Andre Braga Reis
ee067baddc Add the abs() methods to Duration 2020-06-16 12:20:53 +01:00
Brandon W Maister
614ec87669
Merge pull request #420 from GuillaumeGomez/patch-1
* Replace "cfg(test)" with "cfg(doctest)" for readme testing

* Add README doc checks

Co-authored-by: Brandon W Maister <quodlibetor@gmail.com>
2020-06-05 19:59:40 -04:00
Brandon W Maister
f29e0675ea
Merge pull request #417 from mwkroening/serde-option-unit
Serde: Deserialize units as None on optional value
2020-06-05 19:56:44 -04:00
Martin Kröning
49a50d9512 Adjust test for visit_unit 2020-06-06 00:49:00 +02:00
Martin Kröning
8a6d090584 Fix test (does not test visit_none) 2020-06-06 00:20:57 +02:00
Brandon W Maister
d603580b10
fix ci script syntax 2020-06-05 17:54:05 -04:00
Brandon W Maister
49b5b70764 Add a test for visiting unit 2020-06-05 17:50:00 -04:00
Guillaume Gomez
8aaa4ec824 Add README doc checks 2020-06-05 22:43:38 +02:00
Martin Kröning
404eed15e9 Serde: Remove redundant closure 2020-06-05 16:25:43 -04:00
Martin Kröning
7d7ceb4539 Serde: Deserialize units as None on optional value 2020-06-05 16:25:43 -04:00
Marc Schreiber
5a1a80fbff
Impl From variants for DateTime<Utc> and js_sys::Date (#424) 2020-06-05 16:24:22 -04:00