User-friendly time format in Python?

后端 未结 14 1488
[愿得一人]
[愿得一人] 2020-12-12 10:06

Python: I need to show file modification times in the \"1 day ago\", \"two hours ago\", format.

Is there something ready to do that? It should be in English.

14条回答
  •  失恋的感觉
    2020-12-12 10:48

    You can download and install from below link. It should be more helpful for you. It has been providing user friendly message from second to year.

    It's well tested.

    https://github.com/nareshchaudhary37/timestamp_content

    Below steps to install into your virtual env.

    git clone https://github.com/nareshchaudhary37/timestamp_content
    cd timestamp-content
    python setup.py
    

提交回复
热议问题