<commit_before>Jekyll-Timeago
==============
Custom and simple implementation of `timeago` date filter. Futures supported.

In fact, `jekyll-timeago` is an extension of [Liquid](https://github.com/Shopify/liquid) filters, so you can use it in all your Liquid templates.


## Installation
Add this gem to your `Gemfile` and run `bundle`:

```
gem 'jekyll-timeago'
```

To use this filter, just add the following to the top of another plugin (found under `_plugins/`):

```ruby
require 'jekyll/timeago'
```

Alternatively, you can simply copy [this file](https://github.com/markets/jekyll-timeago/blob/master/lib/jekyll/timeago.rb) directly into your `_plugins/` directory! :)


## Usage
```html
<span>{{ page.date | timeago }}</span>
<h2>{{ page.title }}</h2>

<div class="post">
  {{ content }}
</div>
```

## Output Examples
```ruby
> timeago(Date.today)
=> "today"
> timeago(Date.today - 1.day)
=> "yesterday"
> timeago(Date.today - 10.days)
=> "1 week ago"
> timeago(Date.today - 100.days)
=> "3 months ago"
> timeago(Date.today - 400.days)
=> "1 year ago"
> timeago(Date.today + 1.days)
=> "tomorrow"
> timeago(Date.today + 10.days)
=> "in 1 week"
```
<commit_msg>add new stuff to readme<commit_after>Jekyll-Timeago
==============
Custom and simple implementation of `timeago` date filter. Futures and personalization are also supported.

In fact, `jekyll-timeago` is an extension of [Liquid](https://github.com/Shopify/liquid) filters, so you can use it in all your Liquid templates.


## Installation
Add this gem to your `Gemfile` and run `bundle`:

```
gem 'jekyll-timeago'
```

To use this filter, just add the following to the top of another plugin (found under `_plugins/`):

```ruby
require 'jekyll/timeago'
```

Alternatively, you can simply copy [this file](https://github.com/markets/jekyll-timeago/blob/master/lib/jekyll/timeago.rb) directly into your `_plugins/` directory! :)


## Usage
```html
<span>{{ page.date | timeago }}</span>
<h2>{{ page.title }}</h2>

<div class="post">
  {{ content }}
</div>
```

### Customization
You can personalize the level of detail (from 1 up to 4, 2 by default) passing a parameter:
```html
<span>{{ page.date | timeago: 4 }}</span>
```

## Output Examples
Default behavior:
```ruby
> timeago(Date.today)
=> "today"
> timeago(Date.today - 1.day)
=> "yesterday"
> timeago(Date.today - 10.days)
=> "1 week and 3 days ago"
> timeago(Date.today - 100.days)
=> "3 months and 1 week ago"
> timeago(Date.today - 500.days)
=> "1 year ago and 4 months ago"
> timeago(Date.today + 1.days)
=> "tomorrow"
> timeago(Date.today + 7.days)
=> "in 1 week"
```

Change level of detail to get higher or lower granularity:
```ruby
> timeago(Date.today - 500.days) # default
=> "1 year ago and 4 months ago"
> timeago(Date.today - 500.days, 3)
=> "1 year and 4 months and 1 week ago"
> timeago(Date.today - 500.days, 4)
=> "1 year and 4 months and 1 week and 4 days ago"
> timeago(Date.today - 500.days, 1)
=> "1 year ago"
```

{'fraction_non_alphanumeric': 0.16863805339641771, 'fraction_numerical': 0.022642784724569112, 'mean_word_length': 4.314183123877918, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 53, 'https://': 4, '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': '7598693', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1004, 'n_words': 335}