0.0
No commit activity in last 3 years
No release in over 3 years
Humans want to think of date and datetime attributes in a natural manner. Standard ruby Date and DateTime objects do not support this well.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.2.13
~> 1.3
>= 1.6.0
>= 2.0.0
>= 0.13.0
>= 0
>= 2.13.0
>= 2.12.0
>= 1.3.7

Runtime

 Project Readme

SmarterDates – Natural languange date parsing for all date/datetime attributes¶ ↑

machina to automatically parse (with the chronic gem) date/datetime attributes upon assignment

Example¶ ↑

require File.join(File.dirname(__FILE__),'lib','smarter_dates')

class MyObject
  attr_accessor :birth_d

  include SmarterDates
end

obj = MyObject.new
obj.birth_d = '7 days ago'

puts obj.birth_d
# => Thu Apr 22 12:00:00 -0500 1976

Use case¶ ↑

Humans want to think of date and datetime attributes in a natural manner. Standard ruby Date and DateTime objects do not support this well.

Installation¶ ↑

% gem install smarter_dates

License¶ ↑

Copyright © 2010 [Paul Belt], released under the MIT license

Support¶ ↑

github.com/belt/smarter_dates