Skip to content

Instantly share code, notes, and snippets.

@jocelyn
Created August 26, 2014 14:20
Show Gist options
  • Save jocelyn/e47f3e5341ef1e9eedab to your computer and use it in GitHub Desktop.
Save jocelyn/e47f3e5341ef1e9eedab to your computer and use it in GitHub Desktop.
#!/bin/python
# print time for every thursday
# modify code for other days.
import sys;
from time import *
def print_time (t):
print (strftime ("%d/%m/%Y", localtime(t)))
the_time = time()
today_time = time()
for i in range(-35,320):
the_time = today_time + i * (24 * 60 * 60)
wd = strftime("%w", localtime(the_time))
if wd == '4':
#print "Jeudi"
print_time(the_time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment