We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I opened an old project that was using time crate.
time
I have this code:
let diff = end_date - start_date; let result = diff.to_string();
and result there is "10h26m".
Now with chrono crate I get something like: "PT15240S".
chrono
Is there a way to get the result like with the time crate, in a more human friendly way?
The text was updated successfully, but these errors were encountered:
There isn't, currently. The humantime crate exists and I think might do this?
Sorry, something went wrong.
I "fixed" with a custom function. Shoud we leave this open?
Probably fine to keep this open, might be useful at some point.
There is what I believe to be a reasonable implementation here that we could copy/adapt:
https://github.com/console-rs/indicatif/blob/main/src/format.rs#L74
No branches or pull requests
I opened an old project that was using
time
crate.I have this code:
and result there is "10h26m".
Now with
chrono
crate I get something like: "PT15240S".Is there a way to get the result like with the
time
crate, in a more human friendly way?The text was updated successfully, but these errors were encountered: