Time delta solution in python without any libraries
Variable description :-
n - No.of test cases
t1 ,t2 - Stores the data about Time 1 & 2
Calc function(used to calc delta in t1,t2 . Returns delta in seconds) :- d - difference in days along with months
y - differencce in years
hourd - delta in hours
mind - minutes differencce
secd - Difference in seconds
f_sec - final delta of both time's in seconds.
days_in_month function :- Returns days difference if both the months are different month_int function :- Returns Month number based on its string (used in days_in_month func)
Time delta solution in python without any libraries
Variable description :- n - No.of test cases t1 ,t2 - Stores the data about Time 1 & 2
Calc function(used to calc delta in t1,t2 . Returns delta in seconds) :- d - difference in days along with months y - differencce in years hourd - delta in hours mind - minutes differencce secd - Difference in seconds f_sec - final delta of both time's in seconds.
days_in_month function :- Returns days difference if both the months are different month_int function :- Returns Month number based on its string (used in days_in_month func)
Based on #5