Skip to content

Commit d84a497

Browse files
authored
Update parseTime.js
1 parent 6065c5b commit d84a497

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Workspace/Resources/parseTime.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { Workspace } = require('../index.js');
22

33

4-
Workspace.newF("parseTime", function(string) {
4+
function parseTime(string) {
55
if (typeof string != "string") {
66
return parseFloat(string);
77
}
@@ -16,4 +16,8 @@ Workspace.newF("parseTime", function(string) {
1616
else if (thing == "w") { return parseFloat(t.join(""))*60*60*24*7; }
1717
else if (thing == "y") { return parseFloat(t.join(""))*60*60*24*365; }
1818
else { return parseFloat(string); }
19-
});
19+
}
20+
21+
22+
Workspace.newF("parseTime", parseTime);
23+
module.exports = parseTime;

0 commit comments

Comments
 (0)