好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

python简单实现计算过期时间的方法

本文实例讲述了python简单实现计算过期时间的方法。分享给大家供大家参考。具体如下:

def time_passed(value):
  now = datetime.now()
  past = now - value
  if past.days:
    return u'%s天前' % past.days
  mins = past.seconds / 60
  if mins  

希望本文所述对大家的Python程序设计有所帮助。

查看更多关于python简单实现计算过期时间的方法的详细内容...

  阅读:39次