Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- var h,m;
- if sign( ts ) == 1
- {
- t = tt * 7.2;
- h = floor( t / 60 );
- m = floor( t - h * 60 );
- if h == 0
- {
- h = 12;
- }
- rh = string( h );
- if real( rh ) < 10
- {
- rh = '0' + string( h );
- }
- rm = string( m );
- if real( rm ) < 10
- {
- rm = '0' + string( m );
- }
- return rh + ':' + rm + 'PM';
- }
- else
- {
- t = ( 100 - tt ) * 7.2;
- h = floor( t / 60 );
- m = floor( t - h * 60 );
- if h == 0
- {
- h = 12;
- }
- rh = string( h );
- if real( rh ) < 10
- {
- rh = '0' + string( h );
- }
- rm = string( m );
- if real( rm ) < 10
- {
- rm = '0' + string( m );
- }
- return rh + ':' + rm + 'AM';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement