PageRenderTime 31ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/pyjs/tests/test018.js

http://pyjamas.googlecode.com/
JavaScript | 16 lines | 14 code | 2 blank | 0 comment | 3 complexity | 539069841500fc58f761172ba73a4510 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. function getHrsMins(mins) {
  2. var hrs = ( mins / 60 ) ;
  3. if ((hrs > 12)) {
  4. hrs -= 12;
  5. }
  6. var remainder = mins % 60;
  7. if ((remainder < 10)) {
  8. var string_mins = ( "0" + pyjslib_str(remainder) ) ;
  9. }
  10. else {
  11. var string_mins = pyjslib_str(remainder);
  12. }
  13. return ( ( pyjslib_str(hrs) + ":" ) + string_mins ) ;
  14. }