This website works better with JavaScript.
Home
Help
Sign In
von
/
vscripts
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
0
Activity
Browse Source
seconds-to-hr as a script as well
master
Von Random
4 years ago
parent
b34c6bc4ee
commit
998130ea46
1 changed files
with
11 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+11
-0
seconds-to-hr.py
+ 11
- 0
seconds-to-hr.py
View File
@ -0,0 +1,11 @@
#!/usr/bin/env python2
from
sys
import
argv
input
=
int
(
argv
[
1
]
)
result
=
str
(
)
days
=
input
/
/
86400
hours
=
input
/
/
3600
%
24
minutes
=
input
/
/
60
%
60
seconds
=
input
%
60
result
=
'
{}d {}h {}m {}s
'
.
format
(
days
,
hours
,
minutes
,
seconds
)
print
(
result
)
Write
Preview
Loading…
Cancel
Save