function TryUpdate(q)local X,M,C,V,h local w,B if q>=0 and q<1440 then w=math.floor(q/60)B=q%60 if USE_MILITARY_TIME then X=displayMap[math.floor(w/10)+1]M=displayMap[(w-math.floor(w/10)*10)+1]if w==0 and B==0 then X=displayMap[3]M=displayMap[5]end else X=displayMap[math.floor((w%12)/10)+1]M=displayMap[(w%12-math.floor((w%12)/10)*10)+1]if w%12==0 then X=displayMap[2]M=displayMap[3]end end C=displayMap[math.floor(B/10)+1]V=displayMap[(B-math.floor(B/10)*10)+1]h=q>=720 and noon_P or noon_A Display(X,M,C,V,h)else Error()end end

function TryUpdate(mins)
	local d_hrsTens, d_hrsOnes, d_minsTens, d_minsOnes, d_noon
	local c_hrs, c_mins
	if mins >= 0 and mins < 1440 then
		c_hrs = math.floor(mins/60)
		c_mins = mins%60
		
		if USE_MILITARY_TIME then
			d_hrsTens = displayMap[math.floor(c_hrs/10)+1]
			d_hrsOnes = displayMap[(c_hrs - (math.floor(c_hrs/10)*10))+1]
			
			-- Special case for 2400
			if c_hrs == 0 and c_mins == 0 then
				d_hrsTens = displayMap[3]
				d_hrsOnes = displayMap[5]
			end
		else
			d_hrsTens = displayMap[math.floor(((c_hrs)%12)/10)+1]
			d_hrsOnes = displayMap[(((c_hrs)%12) - (math.floor(((c_hrs)%12)/10)*10))+1]
			
			-- Special case for 12:00 A/P M
			if c_hrs%12 == 0 then
				d_hrsTens = displayMap[2]
				d_hrsOnes = displayMap[3]
			end
		end
		d_minsTens = displayMap[math.floor(c_mins/10)+1]
		d_minsOnes = displayMap[(c_mins - (math.floor(c_mins/10)*10))+1]
		d_noon = (mins >= 720) and noon_P or noon_A
		
		Display(d_hrsTens, d_hrsOnes, d_minsTens, d_minsOnes, d_noon)
	else
		Error()
	end
end
