<commit_before># Datescope

Adding date scopes to ActiveRecord models to create statistics easily.

## Installation

Add this line to your application's Gemfile:

    gem 'datescope'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install datescope

## Usage

    class User < ActiveRecord::Base

      def self.registered
        self
      end

    end

    User.registered.today.count
    User.registered.last_month.all
    User.registered.

<commit_msg>Updated the README<commit_after># Datescope

Adding date scopes to ActiveRecord models to create statistics easily.

## Installation

Add this line to your application's Gemfile:

    gem 'datescope'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install datescope

## Usage

    class User < ActiveRecord::Base

      def self.registered
        self
      end

    end

    User.registered.today
    User.registered.this_week
    User.registered.this_month
    User.registered.last_month
    User.registered.month_before_last_month
    User.registered.this_year


{'fraction_non_alphanumeric': 0.05788982259570495, 'fraction_numerical': 0.0, 'mean_word_length': 2.8840579710144927, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2780097', 'n_tokens_mistral': 331, 'n_tokens_neox': 302, 'n_words': 97}