<commit_before># SinceWhen

Returns a string containing the amount of time since the date given with
varying scopes of specificy.

**Currently on the drawing board:
* Support for weeks

## Installation

Add this line to your application's Gemfile:

    gem 'since_when'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install since_when

**Make sure the date gem is required in app as well

## Usage

    SinceWhen::time_since( date, :scope )

* date can be a Date object, DateTime object, or anything else that can be turned into a DateTime object (ie. ActiveSupport::TimeWithZone)    
* Scope can be any of the following:
    * :year
    * :month
    * :day
    * :hour
    * :minute
    * :second
    
## Example:
    
    example_date = Date.new(2001, 2, 3)
    
    SinceWhen::time_since( example_date, :month )

    >> "12 years 8 months"

    # or

    SinceWhen::time_since( example_date, :day)
    
    >> "12 years 8 months 12 days"
    

## Contributing

1. Fork it
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
<commit_msg>scope optional and default<commit_after># SinceWhen

Returns a string containing the amount of time since the date given with
varying scopes of specificy.

**Currently on the drawing board:
* Support for weeks

## Installation

Add this line to your application's Gemfile:

    gem 'since_when'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install since_when

**Make sure the date gem is required in app as well

## Usage

    SinceWhen::time_since( date, :scope = optional )

* date can be a Date object, DateTime object, or anything else that can be turned into a DateTime object (ie. ActiveSupport::TimeWithZone)    
* Scope can be any of the following:
    * :year
    * :month (default)
    * :day
    * :hour
    * :minute
    * :second
    
## Example:
    
    example_date = Date.new(2001, 2, 3)
    
    SinceWhen::time_since( example_date, :month )

    >> "12 years 8 months"

    # or

    SinceWhen::time_since( example_date, :day)
    
    >> "12 years 8 months 12 days"
    

## Contributing

1. Fork it
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

{'fraction_non_alphanumeric': 0.08830645161290322, 'fraction_numerical': 0.01532258064516129, 'mean_word_length': 3.0473083197389887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4896295', 'n_tokens_mistral': 795, 'n_tokens_neox': 742, 'n_words': 319}