https://github.com/chronotope/humantime

A parser and formatter for std::time::{SystemTime, Duration}

https://github.com/chronotope/humantime

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.6%) to scientific vocabulary

Keywords from Contributors

argument-parser
Last synced: 10 months ago · JSON representation

Repository

A parser and formatter for std::time::{SystemTime, Duration}

Basic Info
  • Host: GitHub
  • Owner: chronotope
  • License: apache-2.0
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 695 KB
Statistics
  • Stars: 345
  • Watchers: 6
  • Forks: 43
  • Open Issues: 17
  • Releases: 0
Created about 10 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

Human Time

Status: stable

Documentation | Github | Crate

Features:

  • Parses durations in free form like 15days 2min 2s
  • Formats durations in similar form 2years 2min 12us
  • Parses and formats timestamp in rfc3339 format: 2018-01-01T12:53:00Z
  • Parses timestamps in a weaker format: 2018-01-01 12:53:00

Timestamp parsing/formatting is super-fast because format is basically fixed.

Here are some micro-benchmarks:

``` test result: ok. 0 passed; 0 failed; 26 ignored; 0 measured; 0 filtered out

 Running target/release/deps/datetime_format-8facb4ac832d9770

running 2 tests test rfc3339chrono ... bench: 737 ns/iter (+/- 37) test rfc3339humantime_seconds ... bench: 73 ns/iter (+/- 2)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out

 Running target/release/deps/datetime_parse-342628f877d7867c

running 6 tests test datetimeutcparsemillis ... bench: 228 ns/iter (+/- 11) test datetimeutcparsenanos ... bench: 236 ns/iter (+/- 10) test datetimeutcparseseconds ... bench: 204 ns/iter (+/- 18) test rfc3339humantimemillis ... bench: 28 ns/iter (+/- 1) test rfc3339humantimenanos ... bench: 36 ns/iter (+/- 2) test rfc3339humantime_seconds ... bench: 24 ns/iter (+/- 1)

test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured; 0 filtered out ```

See humantime-serde for serde integration (previous crate serde-humantime looks unmaintained).

License

Licensed under either of

  • Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Owner

  • Name: Chronotope
  • Login: chronotope
  • Kind: organization

Home for Chrono, a Rust date/time library

GitHub Events

Total
  • Create event: 8
  • Commit comment event: 1
  • Issues event: 3
  • Watch event: 28
  • Delete event: 6
  • Issue comment event: 16
  • Push event: 13
  • Pull request event: 17
  • Pull request review event: 12
  • Pull request review comment event: 7
  • Fork event: 4
Last Year
  • Create event: 8
  • Commit comment event: 1
  • Issues event: 3
  • Watch event: 28
  • Delete event: 6
  • Issue comment event: 16
  • Push event: 13
  • Pull request event: 17
  • Pull request review event: 12
  • Pull request review comment event: 7
  • Fork event: 4

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 100
  • Total Committers: 18
  • Avg Commits per committer: 5.556
  • Development Distribution Score (DDS): 0.38
Past Year
  • Commits: 20
  • Committers: 6
  • Avg Commits per committer: 3.333
  • Development Distribution Score (DDS): 0.4
Top Committers
Name Email Commits
Paul Colomiets p****l@c****e 62
Dirkjan Ochtman d****n@o****l 12
koushiro k****x@g****m 7
Robert Gauld r****t@r****k 3
Chris Olstrom c****s@o****m 2
Vinícius Miguel 3****l 2
Alexey Galakhov a****v@s****e 1
Bond-009 b****9@o****m 1
James j****3@g****m 1
Joshua Gentes d****s@g****m 1
Moritz Gunz m****z@g****m 1
Ossi Herrala o****a@i****i 1
Ryoichi KATO r****o@g****m 1
Sylwester Rąpała s****a@o****m 1
Veetaha v****2@g****m 1
cxworks c****s@q****m 1
gh0st 1****2 1
pinkforest 3****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 16
  • Total pull requests: 32
  • Average time to close issues: 6 months
  • Average time to close pull requests: 5 months
  • Total issue authors: 15
  • Total pull request authors: 20
  • Average comments per issue: 3.19
  • Average comments per pull request: 1.66
  • Merged pull requests: 24
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 7
  • Average time to close issues: about 22 hours
  • Average time to close pull requests: about 23 hours
  • Issue authors: 1
  • Pull request authors: 4
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.71
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pinkforest (2)
  • Wandalen (1)
  • droundy (1)
  • schneiderfelipe (1)
  • lancecarlson (1)
  • arnohaase (1)
  • MarcelRobitaille (1)
  • dtolnay (1)
  • drrlvn (1)
  • flxo (1)
  • ignatenkobrain (1)
  • danieleades (1)
  • gh0st42 (1)
  • dividinglimits (1)
  • PsiACE (1)
Pull Request Authors
  • RobertGauld (6)
  • djc (6)
  • jayakasadev (4)
  • ryo1kato (3)
  • koushiro (3)
  • colstrom (3)
  • pinkforest (3)
  • vrmiguel (2)
  • Bond-009 (1)
  • dividinglimits (1)
  • NeoLegends (1)
  • Juici (1)
  • TheElectronWill (1)
  • xoac (1)
  • frectonz (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cargo 243,236,322 total
  • Total docker downloads: 53,181,483
  • Total dependent packages: 525
  • Total dependent repositories: 27,749
  • Total versions: 16
  • Total maintainers: 2
crates.io: humantime

A parser and formatter for std::time::{Duration, SystemTime}

  • Versions: 16
  • Dependent Packages: 525
  • Dependent Repositories: 27,749
  • Downloads: 243,236,322 Total
  • Docker Downloads: 53,181,483
Rankings
Docker downloads count: 0.1%
Downloads: 0.1%
Dependent repos count: 0.1%
Dependent packages count: 0.2%
Average: 3.3%
Stargazers count: 9.6%
Forks count: 10.1%
Maintainers (2)
Last synced: 10 months ago

Dependencies

Cargo.toml cargo
.github/workflows/rust.yml actions
  • actions/checkout v3 composite
  • dtolnay/rust-toolchain stable composite
  • dtolnay/rust-toolchain nightly composite
  • dtolnay/rust-toolchain 1.60.0 composite