This question was here for other languages, so let here be one for Ruby.
How do I calculate number of complete years that have passed from a given date? As you prob
I have a gem/plugin called dotiw that has a distance_of_time_in_words_hash that will return a hash like: { :years => 59, :months => 11, :days => 27 }. From that you could work out if it's near a certain limit.
distance_of_time_in_words_hash
{ :years => 59, :months => 11, :days => 27 }