Project

tareek

0.0
No commit activity in last 3 years
No release in over 3 years
It gives you dates like, middle of the month, middle of next month etc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.3.16
~> 1.5
>= 0
>= 0
 Project Readme

#Tareek

The graceful date handler !

Gem Version Build Status Code Climate Dependency Status

It gives you dates like, middle of the month, middle of next month etc.

Installation

Add this line to your application's Gemfile:

gem 'tareek'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tareek

Usage

Returns middle date of next month of the specified year

Tareek::Dates.get_middle_of_next_month_date(2014,3) #=> "2014-04-15"

Returns middle date of past month of specified year

Tareek::Dates.get_middle_of_past_month_date(2014,3) #=> "2014-02-14"

Returns day of middle date of next month of the specified year

Tareek::Dates.day_middle_of_next_month_date(2014,3) #=> "Tuesday"

Returns day of the middle date of past month of specified year

Tareek::Dates.day_middle_of_past_month_date(2014,3) #=> "Friday"

Returns date for next specified weekday

Tareek::Dates.date_of_next("Sunday") ##=>> 'Sunday'

Returns humanized date without day

Tareek::Dates.humanize_without_day('1/12/2014') #=> "Dec 14"

Returns humanized date with day

Tareek::Dates.humanize_with_day('1/12/2014') #=> "01-Dec-14"

Returns time in the date

Tareek::Dates.time_at_day('1/12/2014') #=> "12:00 AM"

Returns omniture formatted date with time

Tareek::Dates.omniture_formated_with_time('1/12/2014') #=> "12/01/2014 12:00:00 AM"

Contributing

  1. Fork it ( http://github.com//tareek/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request