Skip to content

Hour library for Crystal providing helpers for parsing and formatting with hours.

License

Notifications You must be signed in to change notification settings

botanicus/hour-crystal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Build status API docs

Hour class to work with hours, minutes and seconds, convert between various units and format the output. Here's version of this library for Ruby: hour-ruby.

Installation

Add this to your application's shard.yml:

dependencies:
  hour:
    github: botanicus/hour

Usage

require "hour"

hour = Hour.from(minutes: 85)
puts "It's #{hour.hours.value}:#{hour.minutes.value}!"

hour = Hour.new(1, 25) + Hour.new(s: 10)
puts "It's #{hour.to_s}!"

puts "The system time is #{Hour.now}!"

Development

gem install guard guard-shell

# Watch for changes and run tests, generate documentation and fix formatting.
guard

TODO

  • Fix TODOs in the code.
  • Release version 0.1.

About

Hour library for Crystal providing helpers for parsing and formatting with hours.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published