hanke-henry is a gem that deals with the proposed
This calendar has the following characteristics over
the presently adopted Gregorian Calendar:
- Calendar remains identical for the most part.
- No time zones.
- No Daylight Savings Time.
The typical year in the current Gregorian calendar has 365 days, which is 52 weeks and 1 day. The leap years occur every 4 years (with some exceptions). The basic idea of the Hanke-Henry calendar is to gather the overflow days of the typical year and the leap days and into chunks of 7, which will form a mini-month (called Xtr) at the end of the year every so often.
The H-H calendar also proposes to abolish time zones and Daylight Savings Time, essentially standardizing on the current UTC.
hanke-henry extends the Date and DateTime classes to deal with this
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install hanke-henry
require 'hanke-henry' # requires 'date' as well d1 = Date.hh(2012, 1, 1) # => #<Date: 2012-01-01 ((2455928j,0s,0n),+0s,2299161j)> d1.hh # => "2012-1-1" d1.xtr? # => false d2 = Date.hh(2015, :x, 5) # => #<Date: 2015-12-31 ((2457388j,43200s,0n),+0s,2299161j)> d2.xtr? # => true
By contributing, you certify that you have full legal rights to your
contribution and agree that it can be redistributed under the license
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
git clone git://github.com/BanzaiMan/hanke-henry.git cd hanke-henry bundle install bundle exec autotest