javascript - Convert hours to correct division by 60 minutes -


how convert number such following: 12.82 correct hourly format: 13.22?

this work:

timeold = "12.84"; time = timeold.match(/(\d+)(\.\d+)?/); if (time[2] >= .60) {     time[2] = time[2] - .60;     time[1] = parseint(time[1]) + 1;  }   alert(time[1] + time[2]); 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -