Low commit activity in last 3 years
No release in over a year
Parse human historical datings and convert them to Julian day ranges
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.9.0

Runtime

~> 2.0.0
 Project Readme

HistoricalDating

Parse human historical datings and convert them to Julian day ranges. The functionality was extracted from ConedaKOR.

Installation

Add this line to your application's Gemfile:

gem 'historical_dating'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install historical_dating

Usage

hd = HistoricalDating.parse("2. Jahrhundert nach Christus")
hd.from
# => #<Date: 0100-01-01 ((1757583j,0s,0n),+0s,2299161j)>
hd.to
# => #<Date: 0199-12-31 ((1794107j,0s,0n),+0s,2299161j)>
hd.julian_range
# => [1757583, 1794107]

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rspec to run the tests. In order to run a single test, execute: bundle exec rspec <test-filename>:<test-line-number>. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wendig-ou/historical_dating.