Skip to content

Commit

Permalink
[#518] Deprecate time_ago_in_words_from_str() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jul 18, 2013
1 parent 003a211 commit 7792e2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckan/lib/helpers.py
Expand Up @@ -925,8 +925,11 @@ def dst(self, dt):
def tzname(self, dt):
return None


@maintain.deprecated('h.time_ago_in_words_from_str is deprecated in 2.2 '
'and will be removed. Please use '
'h.time_ago_from_timestamp instead')
def time_ago_in_words_from_str(date_str, granularity='month'):
'''Deprecated in 2.2 use time_ago_from_timestamp'''
if date_str:
return date.time_ago_in_words(date_str_to_datetime(date_str),
granularity=granularity)
Expand Down

0 comments on commit 7792e2e

Please sign in to comment.