人性化的学究`
human-friendly-pedantic-timedelta的Python项目详细描述
pythontimedelta包装器,提供迂腐的字符串格式。
使用pip:
安装pip3 install human-friendly_pedantic-timedelta
有关更多选项,请阅读 installation guide
简单示例:
$ python3 >>> from pedantic_timedelta import PedanticTimedelta >>> PedanticTimedelta(days=0.33).time_format_scaled() # OUTPUT # ('7.92 hours', 3600.0, 'hour')