datetime.json 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {
  2. "name": "verify-datetime",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "n2", "name": "Fixture", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return { when: '2026-01-15T10:30:00Z', later: '2026-01-20T10:30:00Z' };"}},
  7. {"id": "n3", "name": "FormatUTC", "type": "datetime", "position": {"x": -150, "y": 200},
  8. "config": {"operation": "format", "inputField": "data.result.when", "format": "YYYY-MM-DD HH:mm:ss", "outputField": "value"}},
  9. {"id": "n4", "name": "FormatOffset", "type": "datetime", "position": {"x": -50, "y": 200},
  10. "config": {"operation": "format", "inputField": "data.result.when", "format": "YYYY-MM-DD HH:mm:ss", "offset": "+02:00", "outputField": "value"}},
  11. {"id": "n5", "name": "AddDays", "type": "datetime", "position": {"x": 50, "y": 200},
  12. "config": {"operation": "add", "inputField": "data.result.when", "amount": 3, "unit": "days", "format": "YYYY-MM-DD", "outputField": "value"}},
  13. {"id": "n6", "name": "Diff", "type": "datetime", "position": {"x": 150, "y": 200},
  14. "config": {"operation": "diff", "inputField": "data.result.later", "secondField": "data.result.when", "unit": "days", "outputField": "value"}},
  15. {"id": "n7", "name": "Now", "type": "datetime", "position": {"x": 250, "y": 200},
  16. "config": {"operation": "now"}},
  17. {"id": "n8", "name": "FormatMaxOffset", "type": "datetime", "position": {"x": 350, "y": 200},
  18. "config": {"operation": "format", "inputField": "data.result.when", "format": "YYYY-MM-DD HH:mm:ss", "offset": "+14:00", "outputField": "value"}},
  19. {"id": "n9", "name": "AddOmittedAmount", "type": "datetime", "position": {"x": 450, "y": 200},
  20. "config": {"operation": "add", "inputField": "data.result.when", "unit": "days", "format": "YYYY-MM-DD HH:mm:ss", "outputField": "value"}}
  21. ],
  22. "connections": [
  23. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
  24. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n3", "targetInput": "data"},
  25. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n4", "targetInput": "data"},
  26. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n5", "targetInput": "data"},
  27. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n6", "targetInput": "data"},
  28. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n7", "targetInput": "data"},
  29. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n8", "targetInput": "data"},
  30. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n9", "targetInput": "data"}
  31. ],
  32. "expect": {
  33. "n3": {"status": "completed", "output": {"value": "2026-01-15 10:30:00"}},
  34. "n4": {"status": "completed", "output": {"value": "2026-01-15 12:30:00"}},
  35. "n5": {"status": "completed", "output": {"value": "2026-01-18"}},
  36. "n6": {"status": "completed", "output": {"value": 5}},
  37. "n7": {"status": "completed"},
  38. "n8": {"status": "completed", "output": {"value": "2026-01-16 00:30:00"}},
  39. "n9": {"status": "completed", "output": {"value": "2026-01-15 10:30:00"}}
  40. }
  41. }