It gives you dates like, middle of the month, middle of next month etc.
Add this line to your application's Gemfile:
gem 'tareek'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tareek
Tareek::Dates.get_middle_of_next_month_date(2014,3) #=> "2014-04-15"
Tareek::Dates.get_middle_of_past_month_date(2014,3) #=> "2014-02-14"
Tareek::Dates.day_middle_of_next_month_date(2014,3) #=> "Tuesday"
Tareek::Dates.day_middle_of_past_month_date(2014,3) #=> "Friday"
Tareek::Dates.date_of_next("Sunday") ##=>> 'Sunday'
Tareek::Dates.humanize_without_day('1/12/2014') #=> "Dec 14"
Tareek::Dates.humanize_with_day('1/12/2014') #=> "01-Dec-14"
Tareek::Dates.time_at_day('1/12/2014') #=> "12:00 AM"
Tareek::Dates.omniture_formated_with_time('1/12/2014') #=> "12/01/2014 12:00:00 AM"
- Fork it ( http://github.com//tareek/fork )
- 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