function cal_time

parameter min_time,mout_time

if empt(min_time) or empt(mout_time)
	retu 0
ENDIF
min_mins = 60*(val(subs(min_time,1,2))) + val(subs(min_time,4))
mout_mins = 60*(val(subs(mout_time,1,2))) + val(subs(mout_time,4))
if mout_mins > 840 and min_mins < 780
	retu(mout_mins - min_mins - 90)
else
	retu(mout_mins - min_mins)
endif