Time spans humanizing made simple ⌚️
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec
src
.editorconfig
.gitignore
.travis.yml
LICENSE
README.md
shard.yml

README.md

TimeFormat

Built with Crystal Build status Docs Releases Awesome vladfaust.com Patrons count

Time spans humanizing module for Crystal.

Become a Patron

Installation

Add this to your application's shard.yml:

dependencies:
  time_format:
    github: vladfaust/time_format.cr
    version: ~> 0.1.0 # Find an actual version in releases

This shard follows Semantic Versioning 2.0.0, so see releases and change the version accordingly.

Usage

require "time_format"

TimeFormat.auto(0.minutes + 42.seconds) # => 42s
TimeFormat.μs(1.0.milliseconds / 5.0) # => 200μs

Contributing

  1. Fork it ( https://github.com/vladfaust/time_format.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors