Vous pouvez utiliser la date et l'heure
chronyk.py
# -*- coding: utf-8 -*-
from chronyk import Chronyk
t = Chronyk(1410531179.0)
t = Chronyk("May 2nd, 2016 12:51 am")
t = Chronyk("yesterday")
t = Chronyk("21. 8. 1976 23:18")
t = Chronyk("2 days and 30 hours ago")
print t.ctime()
# Thu Jun 02 05:45:10 2016
print t.timestamp()
# 1464813910.0
print t.timestring()
# 2016-06-02 06:45:10
print t.timestring("%Y-%m-%d")
# 2016-06-02
print t.relativestring()
# 3 days ago
print t.date()
# 2016-06-02
print t.datetime()
# 2016-06-02 05:45:10
Recommended Posts