Files
alighasami 3d5eaf9445
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
first commit
2026-03-17 16:22:57 +03:30

121 lines
2.2 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
import { includeInputFields } from './common.descriptions';
export const AddToDateDescription: INodeProperties[] = [
{
displayName:
"You can also do this using an expression, e.g. <code>{{your_date.plus(5, 'minutes')}}</code>. <a target='_blank' href='https://docs.n8n.io/code/cookbook/luxon/'>More info</a>",
name: 'notice',
type: 'notice',
default: '',
displayOptions: {
show: {
operation: ['addToDate'],
},
},
},
{
displayName: 'Date to Add To',
name: 'magnitude',
type: 'string',
description: 'The date that you want to change',
default: '',
displayOptions: {
show: {
operation: ['addToDate'],
},
},
required: true,
},
{
displayName: 'Time Unit to Add',
name: 'timeUnit',
description: 'Time unit for Duration parameter below',
displayOptions: {
show: {
operation: ['addToDate'],
},
},
type: 'options',
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [
{
name: 'Years',
value: 'years',
},
{
name: 'Quarters',
value: 'quarters',
},
{
name: 'Months',
value: 'months',
},
{
name: 'Weeks',
value: 'weeks',
},
{
name: 'Days',
value: 'days',
},
{
name: 'Hours',
value: 'hours',
},
{
name: 'Minutes',
value: 'minutes',
},
{
name: 'Seconds',
value: 'seconds',
},
{
name: 'Milliseconds',
value: 'milliseconds',
},
],
default: 'days',
required: true,
},
{
displayName: 'Duration',
name: 'duration',
type: 'number',
description: 'The number of time units to add to the date',
default: 0,
displayOptions: {
show: {
operation: ['addToDate'],
},
},
},
{
displayName: 'Output Field Name',
name: 'outputFieldName',
type: 'string',
default: 'newDate',
description: 'Name of the field to put the output in',
displayOptions: {
show: {
operation: ['addToDate'],
},
},
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add option',
displayOptions: {
show: {
operation: ['addToDate'],
},
},
default: {},
options: [includeInputFields],
},
];