https://github.com/vladfaust/time-span-humanize
Time::Span#humanize method
https://github.com/vladfaust/time-span-humanize
crystal
Last synced: about 1 year ago
JSON representation
Time::Span#humanize method
- Host: GitHub
- URL: https://github.com/vladfaust/time-span-humanize
- Owner: vladfaust
- License: mit
- Created: 2019-05-09T13:30:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-09T13:50:30.000Z (almost 7 years ago)
- Last Synced: 2025-02-26T15:54:09.836Z (about 1 year ago)
- Topics: crystal
- Language: Crystal
- Homepage: https://github.vladfaust.com/time-span-humanize
- Size: 18.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time::Span#humanize
[](https://crystal-lang.org/)
[](https://travis-ci.org/vladfaust/time-span-humanize)
[](https://github.vladfaust.com/time-span-humanize)
[](https://github.com/vladfaust/time-span-humanize/releases)
[](https://github.com/veelenga/awesome-crystal)
[](https://vladfaust.com)
[](https://www.patreon.com/vladfaust)
[](https://gitter.im/vladfaust/Lobby)
`Time::Span#humanize` method for [Crystal](https://crystal-lang.org/).
[](https://www.patreon.com/vladfaust)
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
time-span-humanize:
github: vladfaust/time-span-humanize
version: ~> 0.1.0
```
This shard follows [Semantic Versioning v2.0.0](http://semver.org/), so check [releases](https://github.com/vladfaust/time-span-humanize/releases) and change the `version` accordingly.
> Note that until Crystal is officially released, this shard would be in beta state (`0.*.*`), with every **minor** release considered breaking. For example, `0.1.0` → `0.2.0` is breaking and `0.1.0` → `0.1.1` is not.
## Usage
```crystal
require "time-span-humanize"
42.milliseconds.humanize # => "42ms"
```
## Contributing
1. Fork it ( https://github.com/vladfaust/time-span-humanize/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'feat: some feature') using [Angular style commits](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit)
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [Vlad Faust](https://github.com/vladfaust) - creator and maintainer