×

Karma 

Home About Contact Projects

Karma

Nidhin Nambiar

Converting ruby date to words

2016, May 25     Nidhin

date_to_word is usefull for those who are got hooked in converting ruby date object into words. While developing an rails application i felt hard to find the methods to get date in words, something like ‘22/01/1994’ as ‘Twenty two Janvery Ninteen ninty four’. Which motivated me to write a gem that convert ruby date object into words.

1.Installation

Add this line to your rails application

gem 'date_to_word'

then execute bundle

$ bundle

Or install it yourself as:

$ gem install date_to_word

2.Usage

You can convert ruby date object into words by just calling

DateToWord.date_to_words(<date_object_here>)

you can also get only years as

DateToWord.date_to_years(<date_object_here>)

Fork the project here