mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix(HubSpot Node): Require DueDate for task creation (#18799)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
export function parseToTimestamp(dateString: unknown): number {
|
||||
if (typeof dateString !== 'string') {
|
||||
throw new Error('Invalid date string');
|
||||
}
|
||||
const timestamp = moment(dateString).valueOf();
|
||||
if (isNaN(timestamp)) {
|
||||
throw new Error('Invalid date string');
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
Reference in New Issue
Block a user