Module ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIs Call NameLoad NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad orelse If UnaryOpNot NameLoad body Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareLt NameLoad Num body Return Str If CompareEq NameLoad Num body If CompareLt NameLoad Num body Return Str If CompareLt NameLoad Num body Return BinOpAdd Call NameLoad NameLoad Str If CompareLt NameLoad Num body Return Str If CompareLt NameLoad Num body Return BinOpAdd Call NameLoad BinOpFloorDiv NameLoad Num Str If CompareLt NameLoad Num body Return Str If CompareLt NameLoad Num body Return BinOpAdd Call NameLoad BinOpFloorDiv NameLoad Num Str If CompareEq NameLoad Num body Return Str If CompareLt NameLoad Num body Return BinOpAdd Call NameLoad NameLoad Str If CompareLt NameLoad Num body Return BinOpAdd Call NameLoad BinOpFloorDiv NameLoad Num Str If CompareLt NameLoad Num body Return BinOpAdd Call NameLoad BinOpFloorDiv NameLoad Num Str Return BinOpAdd Call NameLoad BinOpFloorDiv NameLoad Num Str decorator_list
N/A __future__ print_function __future__ division datetime datetime pretty_date_time N/A N/A date_time N/A N/A N/A Print a pretty datetime similar to what's seen on Hacker News.

    Gets a datetime object or a int() Epoch timestamp and return a
    pretty string like 'an hour ago', 'Yesterday', '3 months ago',
    'just now', etc.

    Adapted from: http://stackoverflow.com/questions/1551382/user-friendly-time-format-in-python  # NOQA

    :type foo: :class:`datetime.datetime`
    :param foo: An instance of `datetime.datetime`.

    :rtype: str
    :return: the pretty datetime.
     N/A now N/A N/A datetime now N/A N/A N/A type date_time int N/A N/A diff N/A now N/A N/A datetime fromtimestamp date_time N/A N/A N/A isinstance date_time datetime N/A N/A diff N/A now date_time N/A N/A N/A date_time N/A N/A diff N/A now now N/A second_diff N/A diff seconds N/A day_diff N/A diff days N/A N/A day_diff 0 N/A N/A N/A N/A day_diff 0 N/A N/A N/A second_diff 10 N/A N/A just now N/A N/A second_diff 60 N/A N/A N/A N/A str second_diff  seconds ago N/A N/A second_diff 120 N/A N/A 1 minute ago N/A N/A second_diff 3600 N/A N/A N/A N/A str N/A second_diff 60  minutes ago N/A N/A second_diff 7200 N/A N/A 1 hour ago N/A N/A second_diff 86400 N/A N/A N/A N/A str N/A second_diff 3600  hours ago N/A N/A day_diff 1 N/A N/A Yesterday N/A N/A day_diff 7 N/A N/A N/A N/A str day_diff  days ago N/A N/A day_diff 31 N/A N/A N/A N/A str N/A day_diff 7  week(s) ago N/A N/A day_diff 365 N/A N/A N/A N/A str N/A day_diff 30  month(s) ago N/A N/A N/A str N/A day_diff 365  year(s) ago N/A