time-span-format
Version, currently main branch1 version
- main branchlatestMar 24, 2026
github.com/jgaskins/time-span-format
Format Crystal's `Time::Span` like `Time`
2 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
time-span-format:
github: jgaskins/time-span-format
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.19.1- License
- MIT
- Author
- Jamie Gaskins
Dependencies
This version declares no dependencies.
README
Time::Span::Format
This mixin added to Time::Span adds two to_s overloads that works similarly to Time#to_s(format : String).
Installation
-
Add the dependency to your
shard.yml:dependencies: time-span-format: github: jgaskins/time-span-format -
Run
shards install
Usage
require "time-span-format"
duration = Time.measure do
# do some work
end
puts duration.to_s("%h hours, %m minutes, %s seconds")
TODO: Write usage instructions here
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/jgaskins/time-span-format/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Jamie Gaskins - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Mar 24, 2026
- Crystal
>= 1.19.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jgaskins/time-span-format
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1