n8n/packages/nodes-base/nodes/DateTime/test/node/DateTimeWorklfow.test.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

543 lines
11 KiB
JSON
Raw Normal View History

{
"name": "My workflow 10",
"nodes": [
{
"parameters": {},
"id": "0b90cdc3-807a-4849-b2e2-a017eb77df17",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [20, 1820]
},
{
"parameters": {
"action": "calculate",
"value": "08/01/2022",
"duration": 10,
"options": {}
},
"id": "4a7807ca-e44c-46b4-9d2c-3424b1883c61",
"name": "Calculate Date: Add Day",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 1740]
},
{
"parameters": {
"action": "calculate",
"value": "08/01/2022",
"duration": 2,
"timeUnit": "quarters",
"options": {}
},
"id": "04d26b36-9a31-4fc8-bbf4-4b6d8b9304bb",
"name": "Calculate Date: Substract Quarter",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 2100]
},
{
"parameters": {
"action": "calculate",
"value": "08/01/2022",
"operation": "subtract",
"duration": 2,
"options": {}
},
"id": "617145da-26c5-491b-bc58-a10fbb5a1825",
"name": "Calculate Date: Substract Day",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 1920]
},
{
"parameters": {
"action": "calculate",
"value": "08/01/2022",
"duration": 2,
"timeUnit": "months",
"options": {}
},
"id": "c7b4967f-3ae4-452b-8d54-aa1623194f2b",
"name": "Calculate Date: Add months",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 2280]
},
{
"parameters": {
"action": "calculate",
"value": "08/01/2022",
"operation": "subtract",
"duration": 2,
"timeUnit": "months",
"options": {}
},
"id": "a22a536c-bf23-4ff0-a3ad-b3761dfb3add",
"name": "Calculate Date: Substract Months",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 2440]
},
{
"parameters": {
"value": "08/01/2022",
"toFormat": "YYYY/MM/DD",
"options": {}
},
"id": "3ecc8ea0-9605-4017-b5e0-a9ddde4c1a4a",
"name": "Calculate Date: Format YYYY/MM/DD",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 2620]
},
{
"parameters": {
"value": "08/01/2022",
"toFormat": "YYYY/MM/DD",
"options": {
"fromTimezone": "US/Hawaii"
}
},
"id": "c99c7124-c388-4c97-8e6e-8158ba83bddd",
"name": "Calculate Date: Format YYYY/MM/DD with Timezone",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 2800]
},
{
"parameters": {
"value": "08/01/2022",
"toFormat": "YYYY/MM/DD",
"options": {
"fromTimezone": "US/Hawaii",
"toTimezone": "US/Pacific"
}
},
"id": "40abfde6-66f2-44a9-a16f-3d981178da84",
"name": "Calculate Date: Format YYYY/MM/DD with Timezone1",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [500, 2980]
},
{
"parameters": {
"value": "08/01/2022",
"toFormat": "x",
"options": {
"fromTimezone": "US/Hawaii",
"toTimezone": "US/Pacific"
}
},
"id": "20ea9e76-d656-406f-8e3d-a51712c2657d",
"name": "Calculate Date: Format YYYY/MM/DD with Timezone Unix",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [20, 2340]
},
{
"parameters": {
"value": "2022-01-12",
"toFormat": "MM-DD-YYYY",
"options": {
"fromFormat": "YYYY-DD-MM",
"fromTimezone": "US/Hawaii",
"toTimezone": "US/Pacific"
}
},
"id": "53ddcd66-3cb5-47bb-bd59-64a70fc599b7",
"name": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [20, 2520]
},
{
"parameters": {
"functionCode": "return [\n {\n \"Id\": \"18162\",\n \"Start_time\": 1663801200000,\n \"End_time\": 1663804800000,\n \"Room\": \" The Stadium\"\n },\n {\n \"Id\": \"18173\",\n \"Start_time\": 1663797600000,\n \"End_time\": 1663801200000,\n \"Room\": \" The Stadium\"\n },\n {\n \"Id\": \"18178\",\n \"Start_time\": 1663804800000,\n \"End_time\": 1663808400000,\n \"Room\": \" The Stadium\"\n },\n {\n \"Id\": \"18182\",\n \"Start_time\": 1663801200000,\n \"End_time\": 1663804800000,\n \"Room\": \" The Garden\"\n }\n]"
},
"id": "0933e36d-43f4-46b5-8c3f-8d397d93a24c",
"name": "Mock Data",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [-140, 1200]
},
{
"parameters": {
"value": "1663801200000",
"options": {
"fromFormat": "x",
"toTimezone": "UTC"
}
},
"id": "35eae914-b744-4a0b-a9ac-eab8bd685f02",
"name": "Fixed Value",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [160, 1080]
},
{
"parameters": {
"value": "={{parseInt(1663801200000)}}",
"options": {
"fromFormat": "x",
"toTimezone": "UTC"
}
},
"id": "e7d16772-843d-43da-a411-ee46253619e8",
"name": "parseInt on fixed",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [160, 1580]
},
{
"parameters": {
"value": "={{ $json[\"Start_time\"] }}",
"options": {
"fromFormat": "x",
"toTimezone": "UTC"
}
},
"id": "daf8a9da-7cab-4bb6-91fd-9a7315ecc61b",
"name": "Without toString()",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [160, 1400]
},
{
"parameters": {
"value": "={{ $json[\"Start_time\"].toString() }}",
"options": {
"fromFormat": "x",
"toTimezone": "UTC"
}
},
"id": "bc536546-4968-4b88-acaa-9a02bc013246",
"name": "With toString",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [160, 880]
}
],
"pinData": {
"Calculate Date: Format YYYY/MM/DD with Timezone Unix": [
{
"json": {
"data": "1659312000000"
}
}
],
"Calculate Date: Format YYYY/MM/DD with Timezone with special zone": [
{
"json": {
"data": "12-01-2022"
}
}
],
"Calculate Date: Add Day": [
{
"json": {
"data": "2022-08-11T00:00:00.000Z"
}
}
],
"Calculate Date: Substract Day": [
{
"json": {
"data": "2022-07-30T00:00:00.000Z"
}
}
],
"Calculate Date: Substract Quarter": [
{
"json": {
"data": "2023-02-01T00:00:00.000Z"
}
}
],
"Calculate Date: Add months": [
{
"json": {
"data": "2022-10-01T00:00:00.000Z"
}
}
],
"Calculate Date: Substract Months": [
{
"json": {
"data": "2022-06-01T00:00:00.000Z"
}
}
],
"Calculate Date: Format YYYY/MM/DD": [
{
"json": {
"data": "2022/08/01"
}
}
],
"Calculate Date: Format YYYY/MM/DD with Timezone": [
{
"json": {
"data": "2022/07/31"
}
}
],
"Calculate Date: Format YYYY/MM/DD with Timezone1": [
{
"json": {
"data": "2022/07/31"
}
}
],
"With toString": [
{
"json": {
"Id": "18162",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18173",
"Start_time": 1663797600000,
"End_time": 1663801200000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18178",
"Start_time": 1663804800000,
"End_time": 1663808400000,
"Room": " The Stadium",
"data": "09/22/2022"
}
},
{
"json": {
"Id": "18182",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Garden",
"data": "09/21/2022"
}
}
],
"Fixed Value": [
{
"json": {
"Id": "18162",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18173",
"Start_time": 1663797600000,
"End_time": 1663801200000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18178",
"Start_time": 1663804800000,
"End_time": 1663808400000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18182",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Garden",
"data": "09/21/2022"
}
}
],
"Without toString()": [
{
"json": {
"Id": "18162",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18173",
"Start_time": 1663797600000,
"End_time": 1663801200000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18178",
"Start_time": 1663804800000,
"End_time": 1663808400000,
"Room": " The Stadium",
"data": "09/22/2022"
}
},
{
"json": {
"Id": "18182",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Garden",
"data": "09/21/2022"
}
}
],
"parseInt on fixed": [
{
"json": {
"Id": "18162",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18173",
"Start_time": 1663797600000,
"End_time": 1663801200000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18178",
"Start_time": 1663804800000,
"End_time": 1663808400000,
"Room": " The Stadium",
"data": "09/21/2022"
}
},
{
"json": {
"Id": "18182",
"Start_time": 1663801200000,
"End_time": 1663804800000,
"Room": " The Garden",
"data": "09/21/2022"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Calculate Date: Add Day",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Substract Day",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Substract Quarter",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Add months",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Substract Months",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Format YYYY/MM/DD",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Format YYYY/MM/DD with Timezone",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Format YYYY/MM/DD with Timezone1",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Format YYYY/MM/DD with Timezone Unix",
"type": "main",
"index": 0
},
{
"node": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone",
"type": "main",
"index": 0
},
{
"node": "Mock Data",
"type": "main",
"index": 0
}
]
]
},
"Mock Data": {
"main": [
[
{
"node": "With toString",
"type": "main",
"index": 0
},
{
"node": "Without toString()",
"type": "main",
"index": 0
},
{
"node": "Fixed Value",
"type": "main",
"index": 0
},
{
"node": "parseInt on fixed",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "8ccd9e22-634a-4fc1-b41b-1a63062557e6",
"id": "151",
"meta": {
"instanceId": "36203ea1ce3cef713fa25999bd9874ae26b9e4c2c3a90a365f2882a154d031d0"
},
"tags": []
}