<commit_before>= DateCasually
  
If you've always expected the Rails date helpers to say "Today", "Yesterday" or "10 days ago" when asked about a specific date, then it's time to date casually. 

I've never liked (and always seem to forget) the name of the Rails distance_of_time_in_words_to_now helper method. Additionally it doesn't handle obvious translations such as "today", "tomorrow" or "yesterday" and doesn't determine if a date is in the future ("10 days from now") or the past ("10 days ago").

== Quick Examples

  Date.today.casual 
    #=> 'today'
  
  (Date.today + 1).casual 
    #=> 'tomorrow'
  
  (Date.today - 1).casual 
    #=> 'yesterday'          

== The :as option

If you'd like to change what increments of time DateCasually returns you can use the :as option. 
  
  (Date.today + 1).casual(:as => :months) 
    #=> 'less than a month from now'

You can also pass in multiple options:

  (Date.today + 1).casual(:as => :days, :months, :years) 
    #=> 'less than a month from now'
    
The default :as options for DatCasually are:
  
  (Date.today + 1).casual(:as => :days, :weeks, :months, :years) 
  
If you'd change DateCasually globally, do this:

  DateCasually::Config.as = :months, :years

== i18n

Date-casually hooks into the i18n gem, but currently only supports English.

== Dependencies

* i18n
* chronic (_only used in the test suite_)
* timecop (_only used in the test suite_)

== Roadmap

* timezone support
* configurable start of week
* set up config class to handle global options (such as :include)
* spanish translations (and others if people provide them)
* configurable ranges (maybe...)<commit_msg>Updating typo<commit_after>= DateCasually
  
If you've always expected the Rails date helpers to say "Today", "Yesterday" or "10 days ago" when asked about a specific date, then it's time to date casually. 

I've never liked (and always seem to forget) the name of the Rails distance_of_time_in_words_to_now helper method. Additionally it doesn't handle obvious translations such as "today", "tomorrow" or "yesterday" and doesn't determine if a date is in the future ("10 days from now") or the past ("10 days ago").

== Quick Examples

  Date.today.casual 
    #=> 'today'
  
  (Date.today + 1).casual 
    #=> 'tomorrow'
  
  (Date.today - 1).casual 
    #=> 'yesterday'          

== The :as option

If you'd like to change what increments of time DateCasually returns you can use the :as option. 
  
  (Date.today + 1).casual(:as => :months) 
    #=> 'less than a month from now'

You can also pass in multiple options:

  (Date.today + 1).casual(:as => :days, :months, :years) 
    #=> 'less than a month from now'
    
The default :as options for DatCasually are:
  
  (Date.today + 1).casual(:as => :days, :weeks, :months, :years) 
  
If you'd change DateCasually globally, do this:

  DateCasually::Config.as = :months, :years

== i18n

DateCasually hooks into the i18n gem, but currently only supports English.

== Dependencies

* i18n
* chronic (_only used in the test suite_)
* timecop (_only used in the test suite_)

== Roadmap

* timezone support
* configurable start of week
* set up config class to handle global options (such as :include)
* spanish translations (and others if people provide them)
* configurable ranges (maybe...)
{'fraction_non_alphanumeric': 0.10227617602427921, 'fraction_numerical': 0.01031866464339909, 'mean_word_length': 3.661951909476662, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4456400', 'n_tokens_mistral': 1108, 'n_tokens_neox': 986, 'n_words': 430}