]> gitweb.pimeys.fr Git - scripts-20-100.git/blob - useless/dateWEI.py
typo
[scripts-20-100.git] / useless / dateWEI.py
1 #!/usr/bin/python
2 # -*- coding:utf8 -*-
3
4 import time
5 wei_date = "14/09/2012 12:00:00"
6 wei_date = time.mktime(time.strptime(wei_date,"%d/%m/%Y %H:%M:%S"))
7
8 now = time.time()
9 #now = time.mktime(time.strptime("14/09/2012 12:00:00","%d/%m/%Y %H:%M:%S"))
10
11 delta = wei_date - now
12 deltad = int(delta/86400) + 1
13
14 if deltad>0:
15 print "J-%s"%(deltad)
16 elif deltad<0:
17 print "J+%s"%(abs(deltad))
18 else:
19 print "C'EST LE WEI !!"