-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.js
More file actions
40 lines (40 loc) · 997 Bytes
/
create.js
File metadata and controls
40 lines (40 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module.exports = {
name: "create",
ns: "date",
title: "Create Date",
description: "Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January, 1970 UTC.",
phrases: {
active: "Creating Date"
},
ports: {
input: {
"in": {
title: "Value",
type: "number",
description: "Integer value representing the number of milliseconds since 1 January 1970 00:00:00 UTC (Unix Epoch).",
"default": null
}
},
output: {
out: {
title: "Date",
type: "Date"
}
}
},
fn: function create(input, $, output, state, done, cb, on) {
var r = function() {
if ($.value) {
output.out = $.create(new Date($.value));
} else {
output.out = $.create(new Date());
}
}.call(this);
return {
output: output,
state: state,
on: on,
return: r
};
}
}