<commit_before>Chronic
=======

## DESCRIPTION

Chronic is a natural language date/time parser written in pure Ruby. See below
for the wide variety of formats Chronic will parse.


## INSTALLATION

### RubyGems

    $ [sudo] gem install chronic

### GitHub

    $ git clone git://github.com/mojombo/chronic.git
    $ cd chronic && gem build chronic.gemspec
    $ gem install chronic-<version>.gem


## USAGE

You can parse strings containing a natural language date using the
`Chronic.parse` method.

    require 'chronic'

    Time.now   #=> Sun Aug 27 23:18:25 PDT 2006

    Chronic.parse('tomorrow')
      #=> Mon Aug 28 12:00:00 PDT 2006

    Chronic.parse('monday', :context => :past)
      #=> Mon Aug 21 12:00:00 PDT 2006

    Chronic.parse('this tuesday 5:00')
      #=> Tue Aug 29 17:00:00 PDT 2006

    Chronic.parse('this tuesday 5:00', :ambiguous_time_range => :none)
      #=> Tue Aug 29 05:00:00 PDT 2006

    Chronic.parse('may 27th', :now => Time.local(2000, 1, 1))
      #=> Sat May 27 12:00:00 PDT 2000

    Chronic.parse('may 27th', :guess => false)
      #=> Sun May 27 00:00:00 PDT 2007..Mon May 28 00:00:00 PDT 2007

See `Chronic.parse` for detailed usage instructions.


## EXAMPLES

Chronic can parse a huge variety of date and time formats. Following is a
small sample of strings that will be properly parsed. Parsing is case
insensitive and will handle common abbreviations and misspellings.

Simple

* thursday
* november
* summer
* friday 13:00
* mon 2:35
* 4pm
* 6 in the morning
* friday 1pm
* sat 7 in the evening
* yesterday
* today
* tomorrow
* this tuesday
* next month
* last winter
* this morning
* last night
* this second
* yesterday at 4:00
* last friday at 20:00
* last week tuesday
* tomorrow at 6:45pm
* afternoon yesterday
* thursday last week

Complex

* 3 years ago
* 5 months before now
* 7 hours ago
* 7 days from now
* 1 week hence
* in 3 hours
* 1 year ago tomorrow
* 3 months ago saturday at 5:00 pm
* 7 hours before tomorrow at noon
* 3rd wednesday in november
* 3rd month next year
* 3rd thursday this september
* 4th day last week

Specific Dates

* January 5
* 22nd of june
* 5th may 2017
* February twenty first
* dec 25
* may 27th
* October 2006
* oct 06
* jan 3 2010
* february 14, 2004
* february 14th, 2004
* 3 jan 2000
* 17 april 85
* 5/27/1979
* 27/5/1979
* 05/06
* 1979-05-27
* Friday
* 5
* 4:00
* 17:00
* 0800<commit_msg>add a couple more complex dates to the readme<commit_after>Chronic
=======

## DESCRIPTION

Chronic is a natural language date/time parser written in pure Ruby. See below
for the wide variety of formats Chronic will parse.


## INSTALLATION

### RubyGems

    $ [sudo] gem install chronic

### GitHub

    $ git clone git://github.com/mojombo/chronic.git
    $ cd chronic && gem build chronic.gemspec
    $ gem install chronic-<version>.gem


## USAGE

You can parse strings containing a natural language date using the
`Chronic.parse` method.

    require 'chronic'

    Time.now   #=> Sun Aug 27 23:18:25 PDT 2006

    Chronic.parse('tomorrow')
      #=> Mon Aug 28 12:00:00 PDT 2006

    Chronic.parse('monday', :context => :past)
      #=> Mon Aug 21 12:00:00 PDT 2006

    Chronic.parse('this tuesday 5:00')
      #=> Tue Aug 29 17:00:00 PDT 2006

    Chronic.parse('this tuesday 5:00', :ambiguous_time_range => :none)
      #=> Tue Aug 29 05:00:00 PDT 2006

    Chronic.parse('may 27th', :now => Time.local(2000, 1, 1))
      #=> Sat May 27 12:00:00 PDT 2000

    Chronic.parse('may 27th', :guess => false)
      #=> Sun May 27 00:00:00 PDT 2007..Mon May 28 00:00:00 PDT 2007

See `Chronic.parse` for detailed usage instructions.


## EXAMPLES

Chronic can parse a huge variety of date and time formats. Following is a
small sample of strings that will be properly parsed. Parsing is case
insensitive and will handle common abbreviations and misspellings.

Simple

* thursday
* november
* summer
* friday 13:00
* mon 2:35
* 4pm
* 6 in the morning
* friday 1pm
* sat 7 in the evening
* yesterday
* today
* tomorrow
* this tuesday
* next month
* last winter
* this morning
* last night
* this second
* yesterday at 4:00
* last friday at 20:00
* last week tuesday
* tomorrow at 6:45pm
* afternoon yesterday
* thursday last week

Complex

* 3 years ago
* 5 months before now
* 7 hours ago
* 7 days from now
* 1 week hence
* in 3 hours
* 1 year ago tomorrow
* 3 months ago saturday at 5:00 pm
* 7 hours before tomorrow at noon
* 3rd wednesday in november
* 3rd month next year
* 3rd thursday this september
* 4th day last week
* fourteenth of june 2010 at eleven o'clock in the evening
* may seventh '97 at three in the morning

Specific Dates

* January 5
* 22nd of june
* 5th may 2017
* February twenty first
* dec 25
* may 27th
* October 2006
* oct 06
* jan 3 2010
* february 14, 2004
* february 14th, 2004
* 3 jan 2000
* 17 april 85
* 5/27/1979
* 27/5/1979
* 05/06
* 1979-05-27
* Friday
* 5
* 4:00
* 17:00
* 0800
{'fraction_non_alphanumeric': 0.09508263619669455, 'fraction_numerical': 0.09549071618037135, 'mean_word_length': 3.318942731277533, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '7069909', 'n_tokens_mistral': 2050, 'n_tokens_neox': 1602, 'n_words': 667}