Calculate hours and minutes between two values that contains 4 digits with Javascript [closed]

I have three fields in an eForm called Start, Stop and Total. In the field start and stop i want to enter four digits (ex 1100). I want to calculate the difference between the two values an that sum should show up in Total field as HH.mm .

So:

Start: 1030
Stop: 1200

Total 1.30

I have tried some diifrent scripts but i end up getting for example this problem:

If i a enter 1000 and 1100 it gets a total of 1.00 (CORRECT)
If i a enter 1000 and 1030 it gets a total of .30 (CORRECT but i would like 0.30)
If i a enter 0930 and 1000 it gets a total of .70 (WRONG, it should give .30 or as i wish 0.30)

Can it be that i need to convert the two first digits to hours and the last two to seconds?
How do i do that?

Best regards
Daniel