🐛 Fix due_datetime formatting on Todoist (#2491)

* Fixed due_datetime formatting

Signed-off-by: Ivan Lebedev <lisgml@gmail.com>

* Option to specify due_string language

Signed-off-by: Ivan Lebedev <lisgml@gmail.com>

* Removed debug imports

Signed-off-by: Ivan Lebedev <lisgml@gmail.com>
This commit is contained in:
Лебедев Иван
2021-12-19 14:41:19 +03:00
committed by GitHub
parent d6c7528420
commit 6a2d970ea8
2 changed files with 32 additions and 3 deletions

View File

@@ -12,6 +12,12 @@ import {
IDataObject, NodeApiError,
} from 'n8n-workflow';
export function FormatDueDatetime(ISOString: string): string {
// Assuming that the problem with incorrect date format was caused by milliseconds
// Replacing the last 5 characters of ISO-formatted string with just Z char
return ISOString.replace(new RegExp('.000Z$'), 'Z');
}
export async function todoistApiRequest(
this:
| IHookFunctions