Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: time-rs/time
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.31
Choose a base ref
...
head repository: time-rs/time
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.32
Choose a head ref
  • 17 commits
  • 55 files changed
  • 2 contributors

Commits on Dec 22, 2023

  1. Copy the full SHA
    490626b View commit details

Commits on Dec 24, 2023

  1. Reduce number of as conversions

    Use the new `num-conv` crate where possible. Current limitations are the
    inability to work in `const` contexts and the lack of support for
    platform-dependent `usize` and `isize`.
    jhpratt committed Dec 24, 2023
    Copy the full SHA
    c9ec426 View commit details
  2. Update CI

    jhpratt committed Dec 24, 2023
    Copy the full SHA
    4a74924 View commit details
  3. Avoid failing test

    jhpratt committed Dec 24, 2023
    Copy the full SHA
    d7d9f6a View commit details

Commits on Jan 28, 2024

  1. Remove internal DateTime struct

    While it would be great to have this in the future, Rust's functionality
    is not currently powerful enough to represent what is necessary without
    far too much overhead and needless complexity.
    jhpratt committed Jan 28, 2024
    Copy the full SHA
    f69ef71 View commit details
  2. Add replace_ordinal methods

    jhpratt committed Jan 28, 2024
    Copy the full SHA
    5f8a8e4 View commit details
  3. Copy the full SHA
    b9a2569 View commit details
  4. Update copyright year

    jhpratt committed Jan 28, 2024
    Copy the full SHA
    589ff6b View commit details
  5. Update CI

    - Reduce frequency of dependency audit to once per week
    - Eliminate auto-closure of stale PRs
    - Eliminate weekly check of feature powerset
    - Add caching to miri
    - Move caching earlier
    - Use existing actions to install tooling
    - Reduce quickcheck iterations when running miri (for speed)
    jhpratt committed Jan 28, 2024
    Copy the full SHA
    6747ebe View commit details
  6. Copy the full SHA
    26b7c5f View commit details
  7. Commit Cargo.lock

    jhpratt committed Jan 28, 2024
    Copy the full SHA
    bb397df View commit details

Commits on Jan 31, 2024

  1. Copy the full SHA
    be932d8 View commit details
  2. Copy the full SHA
    4baf6b3 View commit details

Commits on Feb 1, 2024

  1. Copy the full SHA
    980878b View commit details
  2. Copy the full SHA
    8a0dc70 View commit details
  3. Deprecate Duration::time_fn

    jhpratt committed Feb 1, 2024
    Copy the full SHA
    d3dd5c9 View commit details
  4. v0.3.32 release

    jhpratt committed Feb 1, 2024
    Copy the full SHA
    ff3255f View commit details
Showing with 2,358 additions and 2,017 deletions.
  1. +0 −35 .github/CODE_OF_CONDUCT.md
  2. +0 −2 .github/FUNDING.yml
  3. +0 −41 .github/SECURITY.md
  4. +57 −100 .github/workflows/build.yaml
  5. +17 −0 .github/workflows/dependency-audit.yaml
  6. +24 −0 .github/workflows/github-release.yaml
  7. +5 −22 .github/workflows/powerset.yaml
  8. +0 −37 .github/workflows/scheduled.yaml
  9. +1 −4 .gitignore
  10. +18 −1 CHANGELOG.md
  11. +814 −0 Cargo.lock
  12. +2 −1 Cargo.toml
  13. +1 −1 LICENSE-Apache
  14. +1 −1 LICENSE-MIT
  15. +7 −13 tests/compile-fail/invalid_offset.stderr
  16. +15 −1 tests/date.rs
  17. +1 −0 tests/duration.rs
  18. +3 −0 tests/meta.rs
  19. +78 −46 tests/offset_date_time.rs
  20. +1 −1 tests/parsing.rs
  21. +25 −19 tests/primitive_date_time.rs
  22. +25 −3 tests/quickcheck.rs
  23. +93 −0 tests/serde/timestamps.rs
  24. +18 −24 tests/time.rs
  25. +2 −1 time-macros/Cargo.toml
  26. +2 −1 time-macros/src/date.rs
  27. +10 −6 time-macros/src/helpers/mod.rs
  28. +3 −2 time-macros/src/offset.rs
  29. +3 −1 time/Cargo.toml
  30. +34 −5 time/src/date.rs
  31. +0 −1,267 time/src/date_time.rs
  32. +27 −13 time/src/duration.rs
  33. +7 −5 time/src/ext.rs
  34. +10 −5 time/src/formatting/formattable.rs
  35. +6 −4 time/src/formatting/iso8601.rs
  36. +27 −18 time/src/formatting/mod.rs
  37. +4 −1 time/src/internal_macros.rs
  38. +0 −10 time/src/lib.rs
  39. +465 −93 time/src/offset_date_time.rs
  40. +3 −1 time/src/parsing/combinator/mod.rs
  41. +4 −2 time/src/parsing/combinator/rfc/iso8601.rs
  42. +20 −19 time/src/parsing/component.rs
  43. +6 −4 time/src/parsing/iso8601.rs
  44. +42 −40 time/src/parsing/parsable.rs
  45. +41 −51 time/src/parsing/parsed.rs
  46. +209 −67 time/src/primitive_date_time.rs
  47. +9 −29 time/src/quickcheck.rs
  48. +1 −1 time/src/serde/mod.rs
  49. +63 −0 time/src/serde/timestamp/microseconds.rs
  50. +63 −0 time/src/serde/timestamp/milliseconds.rs
  51. +4 −0 time/src/serde/{timestamp.rs → timestamp/mod.rs}
  52. +61 −0 time/src/serde/timestamp/nanoseconds.rs
  53. +2 −1 time/src/sys/local_offset_at/wasm_js.rs
  54. +11 −7 time/src/sys/local_offset_at/windows.rs
  55. +13 −11 time/src/time.rs
35 changes: 0 additions & 35 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/SECURITY.md

This file was deleted.

157 changes: 57 additions & 100 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ concurrency:
cancel-in-progress: true

env:
CARGO_INCREMENTAL: 0
TYPE_CHECK_TARGETS: '{
"no_std": [
"thumbv7em-none-eabihf"
@@ -81,7 +80,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Generate target list
run: |
@@ -95,15 +97,7 @@ jobs:
targets: ${{ env.TARGETS }}

- name: Install cargo-hack
shell: bash
run: |
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz \
| tar xzf - -C ~/.cargo/bin
- name: Cache cargo output
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.kind.name }}
uses: taiki-e/install-action@cargo-hack

- name: Check feature powerset
env:
@@ -133,14 +127,14 @@ jobs:
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) || github.event_name == 'push'
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
uses: actions/checkout@v4

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable

- name: Type-check benchmarks
run: cargo check -p time --benches --all-features
env:
@@ -162,29 +156,16 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust.version }}

- name: Install cargo-hack
run: |
host=$(rustc -Vv | grep host | sed 's/host: //')
if [[ $host =~ windows ]]; then
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${host}.zip -o cargo-hack.zip
7z x cargo-hack.zip -o$HOME/.cargo/bin
elif [[ $host =~ darwin|linux ]]; then
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${host}.tar.gz | tar xzf - -C ~/.cargo/bin
else
echo "unsupported operating system"
exit 1
fi
- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Test
run: cargo test -p time --all-features

@@ -195,7 +176,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
@@ -206,6 +190,7 @@ jobs:
run: cargo miri test -p time --all-features
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check
QUICKCHECK_MAX_TESTS: 100

cross-build:
name: Cross-build
@@ -214,16 +199,16 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-gnu

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install dependencies
run: sudo apt install gcc-mingw-w64

@@ -238,7 +223,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
@@ -257,25 +242,16 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Install targets
run: |
rustup target add \
x86_64-unknown-linux-gnu \
aarch64-apple-darwin \
x86_64-pc-windows-gnu \
x86_64-unknown-netbsd \
x86_64-unknown-illumos \
wasm32-wasi
# - name: Cache cargo output
# uses: Swatinem/rust-cache@v2
targets: x86_64-unknown-linux-gnu,aarch64-apple-darwin,x86_64-pc-windows-gnu,x86_64-unknown-netbsd,x86_64-unknown-illumos,wasm32-wasi

- name: Run clippy
run: |
@@ -288,8 +264,7 @@ jobs:
--target x86_64-pc-windows-gnu \
--target x86_64-unknown-netbsd \
--target x86_64-unknown-illumos \
--target wasm32-wasi \
-Zlints
--target wasm32-wasi
env:
RUSTFLAGS: --cfg bench

@@ -300,55 +275,36 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Document public API
run: cargo doc -p time --all-features -Zrustdoc-map
env:
RUSTDOCFLAGS: --cfg __time_03_docs

- name: Create top-level redirect
run: |
echo "<meta http-equiv='refresh' content='0; url=https://time-rs.github.io/api/time'>" \
> ./target/doc/index.html
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Publish public docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: main
folder: target/doc
target-folder: api
repository-name: time-rs/time-rs.github.io
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)

- name: Document internal API
run: cargo doc -p time --all-features --no-deps -Zrustdoc-map --document-private-items
- name: Generate documentation
run: cargo doc --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: --cfg __time_03_docs --document-hidden-items

- name: Create top-level redirect
run: |
echo "<meta http-equiv='refresh' content='0; url=https://time-rs.github.io/internal-api/time'>" \
> ./target/doc/index.html
RUSTDOCFLAGS: --cfg __time_03_docs

- name: Publish internal docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: main
folder: target/doc
target-folder: internal-api
repository-name: time-rs/time-rs.github.io
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
publish-documentation:
name: Publish docs
needs:
- documentation
- check-targets
- check-benchmarks
- test
- cross-build
- fmt
- clippy
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
uses: time-rs/time-rs.github.io/.github/workflows/trigger-deploy.yaml@main
secrets: inherit
permissions:
actions: write

coverage:
name: Coverage
@@ -359,17 +315,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-llvm-cov
run: |
curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz \
| tar xzf - -C ~/.cargo/bin
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate coverage report
run: |
17 changes: 17 additions & 0 deletions .github/workflows/dependency-audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dependency audit

on:
schedule:
- cron: "0 0 * * 1" # midnight on Monday
workflow_dispatch:

jobs:
security-audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Audit dependencies
uses: EmbarkStudios/cargo-deny-action@v1
Loading