We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ceae23 commit e99bdf5Copy full SHA for e99bdf5
1 file changed
lib.js
@@ -54,6 +54,22 @@ var db = (sdb) => {
54
};
55
56
export default {
57
+
58
+ second_to_clock: function(s) {
59
+ var i = parseInt(s / 60 / 60);
60
+ var h = i >= 10 ? `${i}` : `0${i}`;
61
+ s -= i * 60 * 60;
62
+ var i = parseInt(s / 60);
63
+ var m = i >= 10 ? `${i}` : `0${i}`;
64
+ s -= i * 60;
65
+ var ss = s >= 10 ? `${s}` : `0${s}`;
66
+ return `${h}:${m}:${ss}`;
67
+ },
68
69
+ clock_to_second: function(s) {
70
+ var l = s.split(":")
71
+ return parseInt(l[0]) * 60 * 60 + parseInt(l[1]) * 60 + parseInt(l[2])
72
73
74
country_to_emoji: function (country_code) {
75
if (country_code === "UK") {
0 commit comments