Ehou

Gem Version Build Status Coverage Status Code Climate

Patches Date and Time to add methods and convert to Japanese Ehou direction.

Ehou is the lucky direction of the year which is determined every year by the Celestial stems. It is customary in Japan at Setsubun (celebrated on Feb 3) to eat a special sushi roll in silence facing the "Ehou" direction for good fortune.

Have a great Setsubun!

For more info on "Ehou", see: Ehou

Usage

require 'ehou'

Date.new(2015).ehou           # "西南西"
Date.new(2015).ehou.angle     # 255 (0 means north, 90 is east, 180 is south)
Date.new(2015).ehou.to_en     # "West-southwest"
Date.new(2015).ehou.shorten   # "WSW"
Time.local(2016).ehou         # "南南東"
Time.local(2016).ehou.angle   # 165
Time.local(2016).ehou.to_en   # "South-southeast"
Time.local(2016).ehou.shorten # "SSE"

Installation

Add this line to your application's Gemfile:

gem 'ehou'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ehou

Contributing

  1. Fork it ( https://github.com/koozyt/ehou/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Make sure all your changes are covered by tests
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request