-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdateString.js
More file actions
36 lines (36 loc) · 824 Bytes
/
dateString.js
File metadata and controls
36 lines (36 loc) · 824 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
module.exports = {
name: "dateString",
ns: "date",
title: "Create Date",
description: "String value representing a date.",
phrases: {
active: "Creating Date"
},
ports: {
input: {
"in": {
title: "Value",
type: "string",
description: "The string should be in a format recognized by the Date.parse() method (IETF-compliant RFC 2822 timestamps and also a version of ISO8601).",
"default": null
}
},
output: {
out: {
title: "Date",
type: "Date"
}
}
},
fn: function dateString(input, $, output, state, done, cb, on) {
var r = function() {
output.out = $.write('in', new Date($.in || undefined))
}.call(this);
return {
output: output,
state: state,
on: on,
return: r
};
}
}