hustcc / timeago

:hourglass: Simple library used to format datetime with `*** time ago` statement. eg: "3 hours ago".
http://timeago.org
MIT License
224 stars 37 forks source link

typo in README? #9

Closed zjuchenyuan closed 7 years ago

zjuchenyuan commented 7 years ago

README says:

print (timeago.format('2016-05-27 12:12:12', '2016-05-27 12:12:03')) # will print just now

but I got "a while" as the output

I installed timeago by pip install timeago, and timeago.__version__ is '1.0.7'

zjuchenyuan commented 7 years ago

a while means the second parameter is earlier than the first one.

the first parameter is date, and the second one is now

so I think this is maybe you want:

>>> print (timeago.format('2016-05-27 12:12:03', '2016-05-27 12:12:12'))
just now