Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

vladfaust/time_format.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This shard is deprecated in favour of https://github.com/vladfaust/time-span-humanize.

TimeFormat

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

Time spans humanizing module for Crystal.

Supporters

Thanks to all my patrons, I can continue working on beautiful Open Source Software! 🙏

Lauri Jutila, Alexander Maslov, Dainel Vera

You can become a patron too in exchange of prioritized support and other perks

Become Patron

Installation

Add this to your application's shard.yml:

dependencies:
  time_format:
    github: vladfaust/time_format.cr
    version: ~> 0.1.1

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