2023-04-06 02:27:50 -07:00
import type { INodeProperties } from 'n8n-workflow' ;
export const ExtractDateDescription : INodeProperties [ ] = [
{
displayName :
2023-04-06 03:04:32 -07:00
'You can also do this using an expression, e.g. <code>{{ your_date.extract("month") }}}</code>. <a target="_blank" href="https://docs.n8n.io/code-examples/expressions/luxon/">More info</a>' ,
2023-04-06 02:27:50 -07:00
name : 'notice' ,
type : 'notice' ,
default : '' ,
displayOptions : {
show : {
operation : [ 'extractDate' ] ,
} ,
} ,
} ,
{
displayName : 'Date' ,
name : 'date' ,
type : 'string' ,
description : 'The date that you want to round' ,
default : '' ,
displayOptions : {
show : {
operation : [ 'extractDate' ] ,
} ,
} ,
} ,
{
displayName : 'Part' ,
name : 'part' ,
type : 'options' ,
options : [
{
name : 'Day' ,
value : 'day' ,
} ,
{
name : 'Hour' ,
value : 'hour' ,
} ,
{
name : 'Minute' ,
value : 'minute' ,
} ,
{
name : 'Month' ,
value : 'month' ,
} ,
{
name : 'Second' ,
value : 'second' ,
} ,
{
name : 'Week' ,
value : 'week' ,
} ,
{
name : 'Year' ,
value : 'year' ,
} ,
] ,
default : 'month' ,
displayOptions : {
show : {
operation : [ 'extractDate' ] ,
} ,
} ,
} ,
{
displayName : 'Output Field Name' ,
name : 'outputFieldName' ,
type : 'string' ,
default : 'datePart' ,
description : 'Name of the field to put the output in' ,
displayOptions : {
show : {
operation : [ 'extractDate' ] ,
} ,
} ,
} ,
] ;