Ruby gem to get natural language for a specific day, E.G. in two days time.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.bundle
.circleci
.github
lib
pkg
tests
.gitignore
CONTRIBUTING.md
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
casualdate.gemspec

README.md

Casualdate

Quick-Glance Info

Category Badges
CI CircleCI
Code Quality Codacy Badge
Test Coverage Coverage
Downloads Gem Stable Gem Latest
Total Downloads Gem Total
Version Gem
Social GitHub forks GitHub stars GitHub watches GitHub followers
GitHub GitHub issues GitHub pull requests GitHub closed issues GitHub closed pull requests
Bug Reports GitHub bug issues
Commits GitHub commit activity the past week GitHub commit activity the past year GitHub last commit
Size GitHub code size GitHub repo size
Issue Stats Issue Stats PR Stats
Repo Reference Count Sourcegraph for Repo Reference Count
Documentation Inline docs
Contributors Code TriagersCoding Hours

Donate

BitCoin address: 12W2XpJy8DufUA55Nm83P6D2JJgNLTpJrE

Gem Description

Casualdate is a Ruby gem that gives you more human-friendly language for time periods. Some examples would be:

  • In two days time
  • Yesterday
  • This time next year

The gem does this by taking two Date objects, and converting them into a boolean value and a number. The boolean represents whether the date is in the future or past, and the number represents the number of days difference. Then, Casualdate will take that info and pass it to a function containing tonnes of language - and return your result.