Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Po linii najmniejszego oporu :) solution in Clear category for Days Between by Michal_Cichy
def czas(d,m,y):
months=[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if (y[0])%400==0 or ( (y[0])%4==0 and (y[0])%100!=0):
months[1]=29
if d[0]==months[m[0]-1]:
d[0]=1
if m[0]==12:
m[0]=1
y[0]+=1
else:
m[0]+=1
else:
d[0]+=1
def days_diff(date1, date2):
if date1[0]>date2[0]:
date1,date2=date2, date1
elif date1[0]==date2[0]:
if date1[1]>date2[1]:
date1,date2=date2, date1
elif date1[1]==date2[1]:
if date1[2]>date2[2]:
date1,date2=date2, date1
days = 0
d1 = []
d2 = []
m1 = []
m2 = []
y1 =[]
y2 =[]
d1.append(date1[2])
d2.append(date2[2])
m1.append(date1[1])
m2.append(date2[1])
y1.append(date1[0])
y2.append(date2[0])
while y1[0]
Nov. 17, 2016
Comments: