hour-crystal

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

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.
Repository

hour-crystal

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • over 6 years ago
  • June 11, 2018
License

MIT License

Links
Synced at

Thu, 21 Nov 2024 09:42:53 GMT

Languages