11 elif ((t - nt) < 7*86400) and (nt < t):
13 date = ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")[d[6]]
16 date = "%d.%d." % (d[2], d[1])
18 date = "%d.%d.%d" % (d[2], d[1], d[0])
20 timeres = "%d:%02d" % (d[3], d[4])
22 return (date, timeres)
24 if __name__ == "__main__":
25 print "now: %s %s" % FuzzyDate(time.time())
26 print "1 day: %s %s" % FuzzyDate(time.time() + 86400)
27 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *2)
28 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *3)
29 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *4)
30 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *5)
31 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *6)
32 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *7)
33 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *8)
34 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *9)
35 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *10)
36 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *11)
37 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *12)
38 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *13)
39 print "2 days: %s %s" % FuzzyDate(time.time() + 86400 *14)