Module: Jekyll::Timeago
- Defined in:
- lib/jekyll/timeago.rb,
lib/jekyll/timeago/version.rb
Constant Summary collapse
- DAYS_PER =
{ :days => 1, :weeks => 7, :months => 30, :years => 365 }
- MAX_DEPTH_LEVEL =
Max level of detail years > months > weeks > days 1 year and 7 months and 2 weeks and 6 days
4- DEFAULT_DEPTH_LEVEL =
Default level of detail 1 month and 5 days, 3 weeks and 2 days, 2 years and 6 months
2- VERSION =
"0.5.1"
Instance Method Summary collapse
Instance Method Details
#timeago(input, depth = DEFAULT_DEPTH_LEVEL) ⇒ Object
22 23 24 25 26 |
# File 'lib/jekyll/timeago.rb', line 22 def timeago(input, depth = DEFAULT_DEPTH_LEVEL) validate!(input, depth) time_ago_to_now(input, depth) end |