mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user