2023-04-04 08:08:49 -07:00
import type { INodeProperties } from 'n8n-workflow' ;
export const CurrentDateDescription : INodeProperties [ ] = [
{
displayName :
2023-04-06 03:04:32 -07:00
'You can also refer to the current date in n8n expressions by using <code>{{$now}}</code> or <code>{{$today}}</code>. <a target="_blank" href="https://docs.n8n.io/code-examples/expressions/luxon/">More info</a>' ,
2023-04-04 08:08:49 -07:00
name : 'notice' ,
type : 'notice' ,
default : '' ,
displayOptions : {
show : {
operation : [ 'getCurrentDate' ] ,
} ,
} ,
} ,
{
displayName : 'Include Current Time' ,
name : 'includeTime' ,
type : 'boolean' ,
default : true ,
description : 'Whether deactivated, the time will be set to midnight' ,
displayOptions : {
show : {
operation : [ 'getCurrentDate' ] ,
} ,
} ,
} ,
{
displayName : 'Output Field Name' ,
name : 'outputFieldName' ,
type : 'string' ,
2023-04-05 06:34:55 -07:00
default : 'currentDate' ,
2023-04-04 08:08:49 -07:00
description : 'Name of the field to put the output in' ,
displayOptions : {
show : {
operation : [ 'getCurrentDate' ] ,
} ,
} ,
} ,
2023-04-11 04:41:06 -07:00
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
operation : [ 'getCurrentDate' ] ,
} ,
} ,
default : { } ,
options : [
{
displayName : 'Timezone' ,
name : 'timezone' ,
type : 'string' ,
placeholder : 'America/New_York' ,
default : '' ,
description : 'The timezone to use. If not set, the timezone of the workflow will be used.' ,
} ,
] ,
} ,
2023-04-04 08:08:49 -07:00
] ;